[Cython] convert-range is default?
Robert Bradshaw
robertwb at math.washington.edu
Sun Dec 7 10:23:03 CET 2008
On Dec 2, 2008, at 3:43 AM, Ondrej Certik wrote:
> Hi,
>
> I noticed that convert-range was enabled by default now?
>
> It seems to have been enabled a long time ago:
>
> http://hg.cython.org/cython/rev/5450c26066e9
Yes.
> So I am a little bit confused, because I have the feeling that I tried
> that after it as well without the "--convert-range" and it didn't
> produce the nice C for loop. But when I tried today, it indeed works.
The most common cause is not cdef'ing the local variable.
> Is this the reason why it was removed from the help?
Yes.
> http://hg.cython.org/cython/rev/7b8970eb4837
>
> Btw, Dag, how is convert-range connected with "Option to emit #line
> directives"? Or maybe you needed space for the new directive?
It's not. I just deleted it when I was editing the help statement,
because it hadn't been deleted earlier. (Technically, I guess that
should have been a separate commit).
> So in any case, "for i in range(10)" are now automatically converted
> by default (if i is declared as an integer), so one doesn't need to
> use the old syntax ("for i from 1 < 5" or something), right?
Yes.
- Robert
More information about the Cython-dev
mailing list