diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2019-06-03 07:34:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-03 07:34:20 (GMT) |
commit | 8565f6b6db0fa9f65449b532a5056a98bad3dc37 (patch) | |
tree | eeeed2b04e30d603a40efbeb8da748325f5f74c3 /Lib/test/test_grammar.py | |
parent | d9677f36fe486e86bb86f2cd59cb7fc3804bdac1 (diff) | |
download | cpython-8565f6b6db0fa9f65449b532a5056a98bad3dc37.zip cpython-8565f6b6db0fa9f65449b532a5056a98bad3dc37.tar.gz cpython-8565f6b6db0fa9f65449b532a5056a98bad3dc37.tar.bz2 |
bpo-35814: Allow unpacking in r.h.s of annotated assignment expressions (GH-13760)
Diffstat (limited to 'Lib/test/test_grammar.py')
-rw-r--r-- | Lib/test/test_grammar.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index 2a3b71f..78d9459 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -454,6 +454,10 @@ class GrammarTests(unittest.TestCase): exec(stmt, ns) self.assertEqual(list(ns['f']()), [None]) + ns = {"a": 1, 'b': (2, 3, 4), "c":5, "Tuple": typing.Tuple} + exec('x: Tuple[int, ...] = a,*b,c', ns) + self.assertEqual(ns['x'], (1, 2, 3, 4, 5)) + def test_funcdef(self): ### [decorators] 'def' NAME parameters ['->' test] ':' suite ### decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE |