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 <1533042026.11.0.56676864532.issue27494@psf.upfronthosting.co.za>
In-reply-to
Content
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 t9.py
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Refactored t9.py
--- t9.py       (original)
+++ t9.py       (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:
RefactoringTool: t9.py
$ ./python t9.py 
  File "t9.py", line 1
    print((set(x for x in list(range(2)),)))
              ^
SyntaxError: Generator expression must be parenthesized
History
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: <1533042026.11.0.56676864532.issue27494@psf.upfronthosting.co.za>
2018-07-31 13:00:26serhiy.storchakalinkissue27494 messages
2018-07-31 13:00:26serhiy.storchakacreate