[Python-Dev] odd "tuple does not support assignment" confusion...
Simon Cross
hodgestar+pythondev at gmail.com
Sat Mar 3 00:32:17 CET 2012
More information about the Python-Dev mailing list
Sat Mar 3 00:32:17 CET 2012
- Previous message: [Python-Dev] odd "tuple does not support assignment" confusion...
- Next message: [Python-Dev] odd "tuple does not support assignment" confusion...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
l[0] += [1] is the same as l[0] = l[0] + [1] Does that make the reason for the error clearer? The problem is the attempt to assign a value to l[0]. It is not the same as e = l[0] e += [1] which is the equivalent to e = l[0] e = e + [1] This never assigns a value to l[0]. Schiavo Simon
- Previous message: [Python-Dev] odd "tuple does not support assignment" confusion...
- Next message: [Python-Dev] odd "tuple does not support assignment" confusion...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list