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-33852: Remove misplaced parentheses around 'list'. #7672

Merged
merged 1 commit into from
Jun 15, 2018

Conversation

andresdelfino
Copy link
Contributor

@andresdelfino andresdelfino commented Jun 13, 2018

@andresdelfino
Copy link
Contributor Author

I think the idea of having "list" inside parentheses is to document that in case of sequences, only "one-expression" expression lists are legal, so "misplaced" wouldn't be the right word.

That being said, explaining that in actual prose would be better, but IMHO removing the parentheses (taking in to account the description of what the expected evaluation of sequences expression lists is) is enough.

@serhiy-storchaka
Copy link
Member

I think parentheses are intentional. "list must evaluate to an integer" looks weird.

Please open an issue on the bug tracker and discuss this change with the original author.

@andresdelfino
Copy link
Contributor Author

Thanks for the review, Serhiy!

I'm adding the issue number now.

@andresdelfino andresdelfino changed the title Remove misplaced parentheses bpo-33852: Remove misplaced parentheses Jun 13, 2018
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.

Yeah, the previous paragraph uses similar words without parentheses.

@terryjreedy
Copy link
Member

It is 'expression list' that must evaluate to whatever, referring back to expression_list in the grammar production.

subscription: `primary` "[" `expression_list` "]"

I don't think this needs a news entry.

@terryjreedy terryjreedy merged commit 4fddd4e into python:master Jun 15, 2018
@miss-islington
Copy link
Contributor

Thanks @andresdelfino for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6, 3.7.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@terryjreedy terryjreedy changed the title bpo-33852: Remove misplaced parentheses bpo-33852: Remove misplaced parentheses around 'list'. Jun 15, 2018
@bedevere-bot
Copy link

GH-7713 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 15, 2018
'expresson list' refers to the grammar term 'expression_list' in the subscription production.
(cherry picked from commit 4fddd4e)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
@miss-islington
Copy link
Contributor

Sorry, @andresdelfino and @terryjreedy, I could not cleanly backport this to 2.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 4fddd4e4069aad9efad999d8d9ce3cd9fb523a5c 2.7

@bedevere-bot
Copy link

GH-7714 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 15, 2018
'expresson list' refers to the grammar term 'expression_list' in the subscription production.
(cherry picked from commit 4fddd4e)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
miss-islington added a commit that referenced this pull request Jun 15, 2018
'expresson list' refers to the grammar term 'expression_list' in the subscription production.
(cherry picked from commit 4fddd4e)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
@andresdelfino andresdelfino deleted the patch-3 branch June 15, 2018 18:46
miss-islington added a commit that referenced this pull request Jun 15, 2018
'expresson list' refers to the grammar term 'expression_list' in the subscription production.
(cherry picked from commit 4fddd4e)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
andresdelfino added a commit to andresdelfino/cpython that referenced this pull request Jun 15, 2018
…H-7672)

'expresson list' refers to the grammar term 'expression_list' in the subscription production..
(cherry picked from commit 4fddd4e)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
@bedevere-bot
Copy link

GH-7716 is a backport of this pull request to the 2.7 branch.

terryjreedy pushed a commit that referenced this pull request Jun 15, 2018
#7716)

'expresson list' refers to the grammar term 'expression_list' in the subscription production..
(cherry picked from commit 4fddd4e)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
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 skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants