extended for-loop test case
authorStefan Behnel <scoder@users.berlios.de>
Fri, 19 Dec 2008 19:18:44 +0000 (20:18 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 19 Dec 2008 19:18:44 +0000 (20:18 +0100)
tests/run/r_forloop.pyx

index 463d6477bc7b462be10e7d1deaa9192c46deaf9c..d8fe8602c1fd6afa9e62d89733ed512f67f04be6 100644 (file)
@@ -15,6 +15,11 @@ __doc__ = u"""
   >>> go_c_int(1,5)
   Spam!
   Spam!
+  >>> go_c_enumerate()
+  True
+  True
+  True
+  True
   >>> go_c_all()
   Spam!
   Spam!
@@ -77,6 +82,11 @@ def go_c():
     for i in range(4):
         print u"Spam!"
 
+def go_c_enumerate():
+    cdef int i,k
+    for i,k in enumerate(range(4)):
+        print i == k
+
 def go_c_int(int a, int b):
     cdef int i
     for i in range(a,b,2):