a pyrex-inspired for-i-from-1-to-n construct backported to Python. Good idea? Bad Idea? PEP?
Francois Pinard
pinard at iro.umontreal.ca
Wed Apr 2 20:39:55 EST 2003
[Greg Ewing (using news.cis.dfn.de)]
> WP wrote:
> > Greg Ewing wrote the following Pyrex snippet:
> > > for i from 0 <= i < n:
> > > result.append(a[i])
> Rather, the motivation was readability and expressiveness. The things
> I like about it are that it gives very clear and unambiguous control
> over the inclusion or exclusion of both endpoints and the direction
> of iteration.
Which admittedly, after having experienced it, is useful.
--
François Pinard http://www.iro.umontreal.ca/~pinard
More information about the Python-list
mailing list