Arg increfing test.
authorRobert Bradshaw <robertwb@math.washington.edu>
Wed, 6 Jan 2010 18:46:32 +0000 (10:46 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Wed, 6 Jan 2010 18:46:32 +0000 (10:46 -0800)
tests/run/arg_incref.pyx [new file with mode: 0644]

diff --git a/tests/run/arg_incref.pyx b/tests/run/arg_incref.pyx
new file mode 100644 (file)
index 0000000..cabc0b8
--- /dev/null
@@ -0,0 +1,12 @@
+def f(dict d):
+    """
+    >>> f({1:1, 2:2})
+    [1, 2]
+    """
+    cdef dict d_new = {}
+    l = []
+    for k in d:
+        d = d_new
+        l.append(k)
+    l.sort()
+    return l