From: Dag Sverre Seljebotn Date: Mon, 2 Feb 2009 21:48:09 +0000 (+0100) Subject: Testcase for temps in SliceIndexNode X-Git-Tag: 0.11.rc~93^2~18 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=95471a58bb603ef9fce42b3c9e0d007c8b11dd1b;p=cython.git Testcase for temps in SliceIndexNode --- diff --git a/tests/run/slice2.pyx b/tests/run/slice2.pyx index 0cb147c1..c4926442 100644 --- a/tests/run/slice2.pyx +++ b/tests/run/slice2.pyx @@ -16,6 +16,9 @@ __doc__ = u""" >>> j(1, [1,2,3,4], 2, 3) [3] + + >>> slice_of_temporary_smoketest() + [3, 2] """ def f(obj1, obj2, obj3, obj4): @@ -33,3 +36,12 @@ def h(obj1, obj2, obj3, obj4): def j(obj1, obj2, obj3, obj4): obj1 = obj2[obj3:obj4] return obj1 + +class A(object): + pass + +def slice_of_temporary_smoketest(): + x = A() + x.a = [1, 2] + x.a[:] = [3,2] + return x.a