[issue40449] multi-line f-string, syntaxerror points to wrong line

2020-05-02 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Since this issue is now resolved, I'm closing it, after I consulted with 
pablogsal.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40449] multi-line f-string, syntaxerror points to wrong line

2020-05-02 Thread Lysandros Nikolaou

Lysandros Nikolaou  added the comment:

This has been fixed in 3.9.0a6 due to the new parser:

╰─ cat a.py
s = ("apricot "
 "pineapple"
 f"shallot{")
╰─ ./python.exe a.py
  File "/Users/lysnikolaou/Repositories/cpython/a.py", line 3
f"shallot{")
   ^
SyntaxError: f-string: expecting '}'

--
nosy: +lys.nikolaou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40449] multi-line f-string, syntaxerror points to wrong line

2020-05-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

There have been issues about SyntaxError line pointing.  Someone should test 
with 3.9.0xx to see if fixed but not backported (I cannot today), or search for 
existing error.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40449] multi-line f-string, syntaxerror points to wrong line

2020-04-30 Thread Gerrit Holl


New submission from Gerrit Holl :

When there is a syntax error in a multi-line f-string, the arrow in the 
reported syntax error points to the wrong line:

$ cat mwe.py 
s = ("apricot "
 "pineapple"
 f"shallot{")
$ python mwe.py 
  File "mwe.py", line 1
s = ("apricot "
^
SyntaxError: f-string: expecting '}'

Tested with Python 3.7.4 and 3.8.2.

--
components: Interpreter Core
messages: 367753
nosy: Gerrit.Holl
priority: normal
severity: normal
status: open
title: multi-line f-string, syntaxerror points to wrong line
versions: Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com