Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-35212: fix col_offset in f-strings #19398

Closed
wants to merge 3 commits into from

Conversation

matanagasauce
Copy link

@matanagasauce matanagasauce commented Apr 6, 2020

@pablogsal
Copy link
Member

Hi @yangyangxcf. Unfortunately, the ast.c module has changed recently and all the functionality has been ported to some new files under the Parser directory. Could you update your PR for the new layout? If you don't have time, I could do it for you if you wish.

@taleinat
Copy link
Contributor

Ping, @yangyangxcf, @pablogsal?

@pablogsal
Copy link
Member

Ping, @yangyangxcf, @pablogsal?

This PR still needs to be rebased as per #19398 (comment). As I mentioned, I am fine to take it over if @yangyangxcf is ok with that

@taleinat
Copy link
Contributor

Let's give this another couple of weeks then, @pablogsal?

@DanielNoord
Copy link
Contributor

DanielNoord commented Mar 16, 2022

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 😄

@ericvsmith
Copy link
Member

@DanielNoord :Thanks for the reminder!

@ericvsmith ericvsmith closed this Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants