1
0
forked from VimPlug/jedi

PEP 3132 unpacking should not raise an error (it may yield wrong results though at the moment), fixes #707.

This commit is contained in:
Dave Halter
2016-07-10 17:50:46 +02:00
parent 7d64069780
commit 1c0aa06c7d
4 changed files with 33 additions and 2 deletions

View File

@@ -401,3 +401,30 @@ def test_func():
pass
#? str()
x
# -----------------
# PEP 3132 Extended Iterable Unpacking (star unpacking)
# -----------------
a, *b, c = [1, 'b', list, dict]
#? int()
a
#? str()
b
#? list
c
# Not valid syntax
a, *b, *c = [1, 'd', list]
#? int()
a
#? str()
b
#? list
c
lc = [x for a, *x in [(1, '', 1.0)]]
#?
lc[0][0]