On 5/10/08, Stefan Behnel <[EMAIL PROTECTED]> wrote:
>  I don't quite see why we shouldn't just always convert
>
>     for var in range(begin, end):
>
>  to
>
>     for var in begin <= var < end:
>
>
> *iff* var is cdef-ed as a C integer type.

I'm definitely +1 on this!!  Regarding to the overflow issue, perhaps
a check can be added before entering the loop. And Cython should take
care if the user modifies the range() arguments inside de loop. What
will you do in this case? IMHO,  matching the Python semantics is the
right way.


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to