mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-35814: Allow unpacking in r.h.s of annotated assignment expressions (GH-13760)
This commit is contained in:
parent
d9677f36fe
commit
8565f6b6db
5 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue