Message389365
Spinoff from #41064. In current python, the f'{*x}' traceback ends with
(*x)
^
SyntaxError: f-string: can't use starred expression here.
For f'{**x}', the message is "f-string: invalid syntax" and the ^ is also under the 2nd character in the replacement expression actually parsed (with a restricted grammar).
The Python error handler must special case a syntax error message beginning with 'f-string:' and search the input line for {...} and add its offset.
IDLE currently highlights "'", the 2nd char of the original code, instead of '*', the 2nd char of the e.text replacement. It needs to also adjust the offset. |
|
Date |
User |
Action |
Args |
2021-03-23 02:03:51 | terry.reedy | set | recipients:
+ terry.reedy |
2021-03-23 02:03:51 | terry.reedy | set | messageid: <1616465031.1.0.790398051902.issue43600@roundup.psfhosted.org> |
2021-03-23 02:03:50 | terry.reedy | link | issue43600 messages |
2021-03-23 02:03:50 | terry.reedy | create | |
|