mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
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:
parent
08e8ab23dd
commit
f89e53da2a
@ -1,23 +1,23 @@
|
|||||||
#!/bin/env python
|
#!/bin/env python
|
||||||
|
|
||||||
# this works...
|
# this works...
|
||||||
l = [[1, []]]
|
l = [[]]
|
||||||
l[0][1] += [1]
|
l[0] += [1]
|
||||||
|
|
||||||
# let's change the structure a bit...
|
# let's change the structure a bit...
|
||||||
l = [(1, [])]
|
l = ([],)
|
||||||
|
|
||||||
# now, this also works...
|
# now, this also works...
|
||||||
e = l[0][1]
|
e = l[0]
|
||||||
e += [1]
|
e += [1]
|
||||||
|
|
||||||
|
|
||||||
# XXX and this fails...
|
# XXX and this fails...
|
||||||
l[0][1] += [1]
|
l[0] += [1]
|
||||||
|
|
||||||
|
|
||||||
# and here is how...
|
# and here is how...
|
||||||
## Traceback (most recent call last):
|
## Traceback (most recent call last):
|
||||||
## File "F:\work\ImageGrid\cur\ImageGrid\src\test\python-bug.py", line 17, in <module>
|
## 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
|
## TypeError: 'tuple' object does not support item assignment
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user