On Sun, Mar 22, 2009 at 10:00 PM, Stefan Behnel <[email protected]> wrote:

> Hi,
>
> Prajwal Suhas P wrote:
> > Here, i tested the 3 cases
> > <1> for i in range(0, somefunc( ) , 1): <2> for i in range(0, 10,
> somefunc(
> > )):
> > <3> for i in range(somefunc( ), 10, 1):
> > all work perfectly fine. So from this, i feel step need not be assigned
> to
> > temp.
> >
> >  cdef int g():
> >     print "g called"
> >     return 3
> >
> > cdef f():
> >     cdef int i
> >     for i in range(0, 10, g()):     ----------> statement
> >         print i
> >     print i
>
> Could you please make sure those three cases are covered by the test case?
>
> Thanks,
>
> Stefan
>
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
The old patch i supplied works perfectly fine for cases--->
   >for i in range(0, 10, somefunc( )):--->STEP case and
   >for i in range(0, somefunc( ) , 1):---->Loop Bound case

but it doesn't work as expected when we invoke a function in start of loop
as like, for i in range(somefunc( ), 10, 1):.
I have updated nodes.py and also the test cases.
This is the new patch for ticket #203.But this time solves the start case
for the range.



-- 
Regards,
Prajwal S.

"There is little difference in people,but this little difference makes a big
difference.The little difference is attitude,the big difference is whether
its positive or negative. "

Attachment: ticket203.patch
Description: Binary data

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to