Skip to content

Non-working attempt to introduce := as an assignment operator#6333

Closed
Rosuav wants to merge 17 commits into
python:masterfrom
Rosuav:assignment-expressions
Closed

Non-working attempt to introduce := as an assignment operator#6333
Rosuav wants to merge 17 commits into
python:masterfrom
Rosuav:assignment-expressions

Conversation

@Rosuav

@Rosuav Rosuav commented Apr 1, 2018

Copy link
Copy Markdown
Contributor

NOT FOR MERGING

This PR is just to make the branch more visible to maintainers, incl @gvanrossum

Comment thread Grammar/Grammar Outdated
suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT

test: or_test ['if' or_test 'else' test] | lambdef
test: [or_test ':='] or_test ['if' or_test 'else' test] | lambdef

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try or_test [':= or_test] instead.

@Rosuav
Rosuav force-pushed the assignment-expressions branch from 8dcb966 to 22547d4 Compare April 10, 2018 13:26
@Rosuav

Rosuav commented Apr 11, 2018

Copy link
Copy Markdown
Contributor Author

The test suite now passes except for those tests which specifically check for the specialness of the first iterable.

@Rosuav
Rosuav force-pushed the assignment-expressions branch from 28e0222 to 8886537 Compare April 15, 2018 04:39
@Rosuav
Rosuav force-pushed the assignment-expressions branch from 8886537 to 161aad8 Compare April 17, 2018 07:30
@Rosuav
Rosuav requested a review from ilevkivskyi as a code owner April 17, 2018 07:30
These tests would remain valid if genexp priming is implemented.
@csabella

csabella commented May 7, 2019

Copy link
Copy Markdown
Contributor

This was implemented under bpo-35224 and #10497.

@csabella csabella closed this May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants