mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +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
|
@ -459,6 +459,13 @@ class TestLiterals(GrammarTest):
|
|||
self.validate(s)
|
||||
|
||||
|
||||
class TestGeneratorExpressions(GrammarTest):
|
||||
|
||||
def test_trailing_comma_after_generator_expression_argument_works(self):
|
||||
# BPO issue 27494
|
||||
self.validate("set(x for x in [],)")
|
||||
|
||||
|
||||
def diff(fn, result):
|
||||
try:
|
||||
with open('@', 'w') as f:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue