Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
Trying to run the following code:
dummy_call("dummy value"foo="bar",)
results in aSyntaxError that looks like:
File "...", line 2 "dummy value" ^^^SyntaxError: invalid syntax. Perhaps you forgot a comma?On 3.13+, the first three characters are also highlighted in red. I would expect the end of the line (where the comma should be) to be marked, thefoo=bar line, or possibly the entire line.
Interestingly, if you remove the indentation, then the error looks as expected:
File "...", line 1 dummy_call("dummy value" foo="bar",) ^^^^^^^^^^^^^^^^^SyntaxError: invalid syntax. Perhaps you forgot a comma?CPython versions tested on:
3.12, 3.13, CPython main branch
Operating systems tested on:
Linux