[Pyrex] [Cython] Language stability

Stefan Behnel stefan_ml at behnel.de
Tue May 13 14:15:00 CEST 2008


Hi Greg,

Greg Ewing wrote:
>> where the (IMHO much more obvious) cdef +
>> range() syntax is optimised
>
> Even in the presence of this optimisation, I don't consider
> that the integer for-loop syntax is entirely redundant.

Not redundant, no. But less calling for improvement.


> The 'for i from...' version was a compromise

I understand that. Still, having two spellings for "for ... in ...", one
for Python, one for C, looks better than a completely different syntax
that just starts with "for". So I vote for

    for x in iterable:

and

    for x in 1 < x <= 5:

instead of the new

    for 1 < x <= 5:

purely for readability (and obviously keeping the old "from" spelling for
compatibility).

Stefan




More information about the Pyrex mailing list