Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb5b5ba commit 0157e7aCopy full SHA for 0157e7a
1 file changed
Lib/test/test_unpack.py
@@ -47,6 +47,18 @@ def __getitem__(self, i):
47
if a <> 0 or b <> 1 or c <> 2:
48
raise TestFailed
49
50
+# single element unpacking, with extra syntax
51
+if verbose:
52
+ print 'unpack single tuple/list'
53
+st = (99,)
54
+sl = [100]
55
+a, = st
56
+if a <> 99:
57
+ raise TestFailed
58
+b, = sl
59
+if b <> 100:
60
61
+
62
# now for some failures
63
64
# unpacking non-sequence
0 commit comments