Elmo Mäntynen wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > This is the case: > > >>>>n=(100,) tuple(*n) > > > Traceback (most recent call last): > File "<pyshell#31>", line 1, in -toplevel- > tuple(*n) > TypeError: iteration over non-sequence
The star (*n) means you are essentially calling tuple(100). And 100 alone isn't a sequence. The star explodes or expands the sequence, like in this example: def doit(x, y, z): print x, y, z vals = (1,2,3) doit(*vals) #see the star symbol -- http://mail.python.org/mailman/listinfo/python-list