Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-27494: Fix 2to3 handling of trailing comma after a generator expression #3771

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

Merged
merged 2 commits into from
Oct 5, 2017

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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.