From: Stefan Behnel Date: Fri, 19 Dec 2008 19:18:44 +0000 (+0100) Subject: extended for-loop test case X-Git-Tag: 0.11-beta~99 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=780c73d0d57cd57907b8afe54450c96fdd61acca;p=cython.git extended for-loop test case --- diff --git a/tests/run/r_forloop.pyx b/tests/run/r_forloop.pyx index 463d6477..d8fe8602 100644 --- a/tests/run/r_forloop.pyx +++ b/tests/run/r_forloop.pyx @@ -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):