List problems in C code ported to Python

wittempj at hotmail.com wittempj at hotmail.com
Mon Jan 17 11:26:44 EST 2005


l = []
for i in range(2):
for j in range(2):
l[i],[j] = 0
print l

gives

Traceback (most recent call last):
File "C:\TEMP\test.py", line 75, in -toplevel-
l[i],[j] = 0
TypeError: unpack non-sequence
That's why your current code needs a matrix class.




More information about the Python-list mailing list