This doesn't work:
def assign():
a, *b = 1,2,3,4,5
return a, b
>>> import x
>>> x.assign()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "x.pyx", line 6, in x.assign (x.c:445)
a, *b = 1,2,3,4,5
TypeError: Expected list, got int
And this is ok:
def assign():
a, *b = 1,2,3,4,5
return a, b
*a, b = 1,2,3,4,5
return a, b
>>> import x
>>> x.assign()
(1, [2, 3, 4, 5])
--
vitja.
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev