From 39d427925829164bfd57c31da28967a6c5ebaa35 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 17 Jan 2008 22:55:41 +0100 Subject: [PATCH] fix tuple unpacking bug --- tests/run/tuplereassign.pyx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/run/tuplereassign.pyx diff --git a/tests/run/tuplereassign.pyx b/tests/run/tuplereassign.pyx new file mode 100644 index 00000000..31de486f --- /dev/null +++ b/tests/run/tuplereassign.pyx @@ -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 -- 2.26.2