You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Column offsets in nested f-string expressions are wrong #114
changed the title [-]Line numbers in nested f-string expressions are wrong[/-][+]Column offsets in nested f-string expressions are wrong[/+]on Apr 28, 2020
Line numbers were fixed by pre-feeding starting line and column numbers to the parser in 991a634. There is still a bug with the column offsets, because the node shifting of the nested expression is executed before that of the outer one.
Activity
lysnikolaou commentedon Apr 21, 2020
@pablogsal @gvanrossum Is there a way to fix this in a way that doesn't require too much effort? I can't think of something.
[-]Line numbers in nested f-string expressions are wrong[/-][+]Column offsets in nested f-string expressions are wrong[/+]lysnikolaou commentedon Apr 28, 2020
Line numbers were fixed by pre-feeding starting line and column numbers to the parser in 991a634. There is still a bug with the column offsets, because the node shifting of the nested expression is executed before that of the outer one.
pablogsal commentedon Apr 28, 2020
Would a single node-shift of the whole f-string tree work? Or we do require two (ordered) shifts?
lysnikolaou commentedon Apr 28, 2020
That might work, yeah! I'll work on it in a bit.
bpo-40334: Fix shifting of nested fstrings