This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients benjamin.peterson, cheryl.sabella, jayvdb, jstasiak, miss-islington, serhiy.storchaka
Date 2018-07-31.13:00:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Sorry, I missed that you didn't receive a notification about creating of the reverting PR. I should announce this explicitly.

2to3 handles the old syntax, but a comma after a generator expression was not a valid old syntax. With your patch it accepted this syntax and produced invalid Python program.

$ ./python -m lib2to3 -w
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Refactored
---       (original)
+++       (refactored)
@@ -1 +1 @@
-print(set(x for x in range(2),))
+print((set(x for x in list(range(2)),)))
RefactoringTool: Files that were modified:
$ ./python 
  File "", line 1
    print((set(x for x in list(range(2)),)))
SyntaxError: Generator expression must be parenthesized
Date User Action Args
2018-07-31 13:00:26serhiy.storchakasetrecipients: + serhiy.storchaka, benjamin.peterson, jstasiak, jayvdb, cheryl.sabella, miss-islington
2018-07-31 13:00:26serhiy.storchakasetmessageid: <>
2018-07-31 13:00:26serhiy.storchakalinkissue27494 messages
2018-07-31 13:00:26serhiy.storchakacreate