[Cython] [Fwd: Re: Beginner-friendly tickets]
Dag Sverre Seljebotn
dagss at student.matnat.uio.no
Wed Mar 18 09:04:17 CET 2009
Anoop Saldanha wrote:
> Does it make any difference, if the start point in a range() is a
> function call or even if it is modified to a new value inside the loop?
> Even if it is modified, the start would be evaluated only once, isn't
> it? I defined a start function and supplied it to the range() and from
> the output it looked like start is called once, and also the c output
> seems to agree with this. In this case if the start is a function
> call, then it doesn't have to be handled right? I am not sure if I have
> caught the topic right! Or am i missing something here?
No, of course, you are right. And actually I think Magnus already fixed
"step". Testcases should reveal whether he did, there ought to be
something in the ticket he fixed:
http://trac.cython.org/cython_trac/ticket/196
So the patch posted here was likely correct except for the type of the
temp variable.
--
Dag Sverre
More information about the Cython-dev
mailing list