Commit 0da3fcb6 authored by Stefan Behnel's avatar Stefan Behnel

additional test case for extended unpacking

parent 210fefda
......@@ -39,6 +39,24 @@ def unpack_tuple(tuple t):
a, b = t
return a,b
def unpack_single(l):
"""
>>> unpack_single([1])
[1]
>>> unpack_single('1')
['1']
"""
*a, = l
return a
def unpack_tuple_single(tuple t):
"""
>>> unpack_tuple_single((1,))
[1]
"""
*a, = t
return a
def assign():
"""
>>> assign()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment