-
-
Notifications
You must be signed in to change notification settings - Fork 30k
-
-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document SyntaxError args and interpretation for f-string fields #88488
Comments
Document that SyntaxError args[1] is a tuple of the other attributes and how the meaning of the attributes is adjusted when the syntax error is in an f-string field replacement expression. Also add compile() to the list of builtins that can raise SyntaxError. PR to follow immediately. I wrote most of the text so that it works for 3.9 and 3.10+, with the new end info. In the example, the main part of the message changed from "invalid syntax" to "invalid syntax. Perhaps you forgot a comma?". I hid that with '...' but each could be given in the respective versions. args[1] changes from "('', 1, 4, '(a b)\n')" to "('', 1, 2, '(a b)\n', 1, 5)" and that will have to be changed in a 3.9 backport. Spinoff from bpo-43705. I will create a separate issue for using this information in IDLE. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: