[issue29051] Improve error reporting involving f-strings (PEP 498)

2018-09-11 Thread Eric V. Smith
Eric V. Smith added the comment: Because this issue describes two different problems, I'm going to close it. The part of it that involves errors during the evaluation of a syntactically valid expression was at least partially fixed in #30465. I will probably re-work how this fix was

[issue29051] Improve error reporting involving f-strings (PEP 498)

2017-12-19 Thread Eric V. Smith
Eric V. Smith added the comment: The example above (msg289501) has been fixed. I think it was in #30465. It also fixes some of these other cases, but I haven't reviewed them all. -- ___ Python tracker

[issue29051] Improve error reporting involving f-strings (PEP 498)

2017-06-06 Thread Liran Nuna
Changes by Liran Nuna : -- nosy: +Liran Nuna ___ Python tracker ___ ___ Python-bugs-list

[issue29051] Improve error reporting involving f-strings (PEP 498)

2017-03-15 Thread Mateusz Bysiek
Changes by Mateusz Bysiek : -- nosy: +mbdevpl ___ Python tracker ___ ___ Python-bugs-list

[issue29051] Improve error reporting involving f-strings (PEP 498)

2017-03-14 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- nosy: +Jim Fasarakis-Hilliard ___ Python tracker ___

[issue29051] Improve error reporting involving f-strings (PEP 498)

2017-03-12 Thread Claudiu Popa
Claudiu Popa added the comment: I'm adding another example here, where the lineno reporting is wrong: from ast import parse n = parse(''' def test(): return f"{a}" ''') f = n.body[0].body[0].value.values[0] n = f.value print("name lineno", n.lineno) In this example, the

[issue29051] Improve error reporting involving f-strings (PEP 498)

2017-01-20 Thread Mark Shannon
Mark Shannon added the comment: It is also worth mentioning that incorrect line numbers means that tools like pyflakes, pylint, mypy, lgtm, etc, need to reimplement parsing of f-strings. -- ___ Python tracker

[issue29051] Improve error reporting involving f-strings (PEP 498)

2017-01-20 Thread Mark Shannon
Mark Shannon added the comment: This problem is the parsing of f-strings. The expressions in an f-string are not "eval"ed in the sense of the eval() function. They are evaluated exactly the same as any other Python expression. However the parsing of f-strings does not provide correct line

[issue29051] Improve error reporting involving f-strings (PEP 498)

2016-12-23 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue29051] Improve error reporting involving f-strings (PEP 498)

2016-12-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Tracebacks should contain the first line of continuation lines ___ Python tracker

[issue29051] Improve error reporting involving f-strings (PEP 498)

2016-12-23 Thread R. David Murray
R. David Murray added the comment: These are not problems with f-strings in particular, they are problems in general with the way python parsing and error reporting happens. The second is presumably (I haven't gotten around to understanding how f-strings work under the hood) an example of

[issue29051] Improve error reporting involving f-strings (PEP 498)

2016-12-23 Thread Chi Hsuan Yen
New submission from Chi Hsuan Yen: Here are the two examples I found confusing when playing with f-strings. The first one involves with a NameError: $ cat test2 f''' { FOO } ''' $ python3.7m test2 Traceback (most recent call last): File "test2", line 5, in ''' NameError: name 'FOO' is