10000 Clarify that error messages are better with PEP 701 by pablogsal · Pull Request #105150 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Clarify that error messages are better with PEP 701 #105150

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

Merged
merged 6 commits into from
May 31, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Doc/whatsnew/3.12.rst
Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
  • Loading branch information
pablogsal and mgmacias95 authored May 31, 2023
commit 7ca09c375fb687d2fd63a56556479c4b8e431b38
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ f-string raises a :exc:`SyntaxError`:

but the error message doesn't include the exact location of the error withing the line and
also has the expression artificially surrounded by parentheses. In Python 3.12, as f-strings
are parsed with the PEG parser, so error messages can be more precise and show the entire line:
are parsed with the PEG parser, error messages can be more precise and show the entire line:

>>> my_string = f"{x $ y}" + f"{1 + 1}"
...
Expand Down
0