Skip to content

Conversation

jstasiak
Copy link
Contributor

While this is a valid Python 2 and Python 3 syntax lib2to3 would choke
on it:

    set(x for x in [],)

This patch changes the grammar definition used by lib2to3 so that the
actual Python syntax is supported now and backwards compatibility is
preserved.

https://bugs.python.org/issue27494

Note: there are some issues with the build of the first pull request I created (#60) to merge this change so this is a replacement pull request I create, hoping it'll fix things.

…ession

While this is a valid Python 2 and Python 3 syntax lib2to3 would choke
on it:

    set(x for x in [],)

This patch changes the grammar definition used by lib2to3 so that the
actual Python syntax is supported now and backwards compatibility is
preserved.
@jstasiak
Copy link
Contributor Author

jstasiak commented Oct 4, 2017

@ambv or @benjaminp may I ask for a review? If there's a more appropriate review I'd appreciate an information.

@benjaminp benjaminp merged commit af810b3 into python:master Oct 5, 2017
@jstasiak
Copy link
Contributor Author

jstasiak commented Oct 5, 2017

Thanks!

@jstasiak jstasiak deleted the fix-lib2to3 branch October 5, 2017 14:04
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Jul 11, 2018
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 31, 2018
… generator expression (pythonGH-3771)" (pythonGH-8241)

This reverts commit af810b3.

This is not valid syntax (see bpo-32012).
(cherry picked from commit 4b8a7f5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Jul 31, 2018
…a generator expression (GH-3771)" (#8241)

This reverts commit af810b3.

This is not valid syntax (see bpo-32012).
miss-islington added a commit that referenced this pull request Jul 31, 2018
… generator expression (GH-3771)" (GH-8241)

This reverts commit af810b3.

This is not valid syntax (see bpo-32012).
(cherry picked from commit 4b8a7f5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants