fix tuple unpacking bug
authorStefan Behnel <scoder@users.berlios.de>
Thu, 17 Jan 2008 21:55:41 +0000 (22:55 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Thu, 17 Jan 2008 21:55:41 +0000 (22:55 +0100)
tests/run/tuplereassign.pyx [new file with mode: 0644]

diff --git a/tests/run/tuplereassign.pyx b/tests/run/tuplereassign.pyx
new file mode 100644 (file)
index 0000000..31de486
--- /dev/null
@@ -0,0 +1,20 @@
+__doc__ = """
+    >>> test1( (1,2,3) )
+    1
+    >>> test3( (1,2,3) )
+    3
+    >>> test( (1,2,3) )
+    3
+"""
+
+def test1(t):
+    t,a,b = t
+    return t
+
+def test3(t):
+    a,b,t = t
+    return t
+
+def test(t):
+    t,t,t = t
+    return t