From f89e53da2a25023b3ab8bf11b87469db46ce8e2e Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 3 Mar 2012 11:36:59 +0400 Subject: [PATCH] simplified the bug demo and reported it to python-dev... Signed-off-by: Alex A. Naanou --- test/python-bug.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/python-bug.py b/test/python-bug.py index db5ea1fb..b78846d6 100755 --- a/test/python-bug.py +++ b/test/python-bug.py @@ -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 -## l[0][1] += [1] +## l[0][0] += [1] ## TypeError: 'tuple' object does not support item assignment