Skip to content
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

Merged
merged 8 commits into from
Mar 6, 2020

Conversation

brandtbucher
Copy link
Member

@brandtbucher brandtbucher commented Mar 6, 2020

Leaving the prose part blank for @shankarj67 to fill in a follow-up PR.

https://bugs.python.org/issue39868

@brandtbucher brandtbucher requested a review from gvanrossum March 6, 2020 01:48
@brandtbucher
Copy link
Member Author

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.

Copy link
Member

@gvanrossum gvanrossum left a 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
Copy link
Member

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.

Copy link
Member

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.)

@gvanrossum gvanrossum merged commit 8bae219 into python:master Mar 6, 2020
@miss-islington
Copy link
Contributor

Thanks @brandtbucher for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@bedevere-bot
Copy link

@gvanrossum: Please replace # with GH- in the commit message next time. Thanks!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 6, 2020
(cherry picked from commit 8bae219)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
@bedevere-bot
Copy link

GH-18797 is a backport of this pull request to the 3.8 branch.

miss-islington added a commit that referenced this pull request Mar 6, 2020
(cherry picked from commit 8bae219)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
@brandtbucher
Copy link
Member Author

Thanks, sounds good.

@brandtbucher brandtbucher deleted the 572-docs branch July 21, 2022 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants