From 95471a58bb603ef9fce42b3c9e0d007c8b11dd1b Mon Sep 17 00:00:00 2001 From: Dag Sverre Seljebotn Date: Mon, 2 Feb 2009 22:48:09 +0100 Subject: [PATCH] Testcase for temps in SliceIndexNode --- tests/run/slice2.pyx | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- 2.26.2