mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
bpo-33348: parse expressions after * and ** in lib2to3 (GH-6586)
These are valid even in python 2.7 https://bugs.python.org/issue33348 Automerge-Triggered-By: @gpshead
This commit is contained in:
parent
3bbb6db545
commit
96b06aefe2
6 changed files with 14 additions and 11 deletions
|
@ -253,6 +253,13 @@ class TestUnpackingGeneralizations(GrammarTest):
|
|||
def test_double_star_dict_literal_after_keywords(self):
|
||||
self.validate("""func(spam='fried', **{'eggs':'scrambled'})""")
|
||||
|
||||
def test_double_star_expression(self):
|
||||
self.validate("""func(**{'a':2} or {})""")
|
||||
self.validate("""func(**() or {})""")
|
||||
|
||||
def test_star_expression(self):
|
||||
self.validate("""func(*[] or [2])""")
|
||||
|
||||
def test_list_display(self):
|
||||
self.validate("""[*{2}, 3, *[4]]""")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue