From 6059014ebafe4b8b27f5f756e88c7501c03bed3b Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 3 Mar 2012 02:24:13 +0400 Subject: [PATCH] found a bug in python see: test/python-bug.py Signed-off-by: Alex A. Naanou --- test/python-bug.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 test/python-bug.py diff --git a/test/python-bug.py b/test/python-bug.py new file mode 100755 index 00000000..db5ea1fb --- /dev/null +++ b/test/python-bug.py @@ -0,0 +1,23 @@ +#!/bin/env python + +# this works... +l = [[1, []]] +l[0][1] += [1] + +# let's change the structure a bit... +l = [(1, [])] + +# now, this also works... +e = l[0][1] +e += [1] + + +# XXX and this fails... +l[0][1] += [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] +## TypeError: 'tuple' object does not support item assignment