[issue42209] Incorrect line reported in syntax error

2022-01-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Arian-f's new issue is #46237. -- nosy: +terry.reedy superseder: -> Incorrect line reported in syntax error ___ Python tracker ___

[issue42209] Incorrect line reported in syntax error

2021-12-15 Thread arian-f
arian-f added the comment: There are still variations of this issue in python 3.10 - the line nr is correct - in script attached it's line 2 (the attached script is otherwise the same): f'{ 1_a }' resulting in: File "test.py", line 1 ( 1_a ) ^ SyntaxError: invalid

[issue42209] Incorrect line reported in syntax error

2020-10-30 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42209] Incorrect line reported in syntax error

2020-10-30 Thread gKuhn
gKuhn added the comment: Ah, that makes sense, thank you for the info. The line number is probably the most important piece of information here anyway. It sounds like the syntax error string is already planned and as such this is probably a duplicate. Please close if this is the case.

[issue42209] Incorrect line reported in syntax error

2020-10-30 Thread Eric V. Smith
Eric V. Smith added the comment: The line number has been fixed in python 3.9: File "...\foo.py", line 5 (**kwargs) ^ SyntaxError: f-string: invalid syntax The error message should improve when we move parsing of f-strings into the parser. I doubt we'd put in the effort to do

[issue42209] Incorrect line reported in syntax error

2020-10-30 Thread gKuhn
New submission from gKuhn : Attempting to parse the following python code results in a fairly unhelpful syntax error along with an incorrect line number being reported: #a dodgy f-string def dodgy(**kwargs): print(f"{**kwargs}") The result: File "", line 1 (**kwargs)