simplified the bug demo and reported it to python-dev...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2012-03-03 11:36:59 +04:00
parent 08e8ab23dd
commit f89e53da2a

View File

@ -1,23 +1,23 @@
#!/bin/env python
# this works...
l = [[1, []]]
l[0][1] += [1]
l = [[]]
l[0] += [1]
# let's change the structure a bit...
l = [(1, [])]
l = ([],)
# now, this also works...
e = l[0][1]
e = l[0]
e += [1]
# XXX and this fails...
l[0][1] += [1]
l[0] += [1]
# and here is how...
## Traceback (most recent call last):
## File "F:\work\ImageGrid\cur\ImageGrid\src\test\python-bug.py", line 17, in <module>
## l[0][1] += [1]
## l[0][0] += [1]
## TypeError: 'tuple' object does not support item assignment