-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
bpo-39868: Update Language Reference for PEP 572. #18793
Conversation
I think this should be good, but perhaps you can double-check my grammar here @gvanrossum? You likely have a better understanding of PEP 572's corner-cases than I do. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I'll merge this now. For the TODO part we'll wait for Shankar Jha (see bpo-39868). Please give him some guidance.
if_stmt: "if" `expression` ":" `suite` | ||
: ("elif" `expression` ":" `suite`)* | ||
if_stmt: "if" `assignment_expression` ":" `suite` | ||
: ("elif" `assignment_expression` ":" `suite`)* | ||
: ["else" ":" `suite`] | ||
|
||
It selects exactly one of the suites by evaluating the expressions one by one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think "expression" here needs updating too? It becomes a bit ugly that way, and in context it doesn't seem ambiguous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I thought more about it and I don't think it needs updating, so I'll land now.)
Thanks @brandtbucher for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8. |
@gvanrossum: Please replace |
(cherry picked from commit 8bae219) Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
GH-18797 is a backport of this pull request to the 3.8 branch. |
Thanks, sounds good. |
Leaving the prose part blank for @shankarj67 to fill in a follow-up PR.
https://bugs.python.org/issue39868