◐ Shell
clean mode source ↗

bpo-27494: Fix 2to3 handling of trailing comma after a generator expression by jstasiak · Pull Request #3771 · python/cpython

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

@benjaminp

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>

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>