mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
closes bpo-27494: Fix 2to3 handling of trailing comma after a generator expression (#3771)
This commit is contained in:
parent
a8ed11742b
commit
af810b35b4
7 changed files with 38 additions and 10 deletions
|
|
@ -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)+ [',']
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue