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

This commit is contained in:
Jakub Stasiak 2017-10-05 09:10:09 +02:00 committed by Benjamin Peterson
parent a8ed11742b
commit af810b35b4
7 changed files with 38 additions and 10 deletions

View file

@ -15,7 +15,7 @@ class FixParen(fixer_base.BaseFix):
PATTERN = """
atom< ('[' | '(')
(listmaker< any
comp_for<
old_comp_for<
'for' NAME 'in'
target=testlist_safe< any (',' any)+ [',']
>
@ -24,7 +24,7 @@ class FixParen(fixer_base.BaseFix):
>
|
testlist_gexp< any
comp_for<
old_comp_for<
'for' NAME 'in'
target=testlist_safe< any (',' any)+ [',']
>