Closed as not planned
Description
Enhancement for error output of f-string
Let's assume a f-string expression like that;
f"test (|) {|} (|) test (|)"
This statement produces a error like that;
>>> f"test (|) {|} (|) test (|)"
File "<stdin>", line 1
(|)
^
SyntaxError: f-string: invalid syntax
>>>
Who reading this comment may be confused by thinking that the wrong part is in test (|)
. But the wrong part of the code is {|}
.
Suggestion
If the error output is corrected in this way, the confusion will be eliminated.
>>> f"test (|) {|} (|) test (|)"
File "<stdin>", line 1
{|}
^
SyntaxError: f-string: invalid syntax
>>>