Terry J. Reedy <[email protected]> added the comment:
Cressey noted both a compile and IDLE Shell issue. They must be handled
separately by different people in separate bpo issues.
The first is about the helpful versus less helpful SyntaxError messages in the
following (master compiled today).
>>> f'{*x}'
File "<stdin>", line 1
(*x)
^
SyntaxError: f-string: can't use starred expression here
>>> f'{**x}'
File "<stdin>", line 1
(**x)
^
SyntaxError: f-string: invalid syntax
The request is make the 2nd message the same or like the 1st. Seems like it
should be possible. I am limiting this bpo issue to this request and opened
#43600 for fixing IDLE's highlight location.
Pablo, I leave it to you to handle the message enhancement request. Do you
know if there is any other situation like this in which the compiled text is
not the input code?
----------
assignee: terry.reedy ->
components: -IDLE
title: f-string SyntaxError gives offset within fake line, other issues ->
Specialise syntax error of **dict in f-string field
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue41064>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com