◐ Shell
clean mode source ↗

bpo-35212: fix col_offset in f-strings by matanagasauce · Pull Request #19398 · python/cpython

I believe this was fixed by #27729.

The reported issues seem similar to what is fixed there. Note that on Python 3.10 this now works as expected:

>>> ast.parse("f'{a}'").body[0].value.values[0].value.col_offset
3
>>> ast.parse("f'{a:b}'").body[0].value.values[0].value.col_offset
3

The other issue in the original report is resolved as well.

Edit: @ericvsmith Gentle ping since you closed the bpo and might want to close this PR as well 😄