PEP 276 Simple Iterator for ints (fwd)
fperez528 at yahoo.com
Tue Nov 27 01:58:34 CET 2001
David Eppstein wrote:
>> (for i in [0, 1, .. 5] ). Especially this latter would
>> definitely be understandable to anyone, IMHO.
> Your final option is very close to my suggestion, much earlier in
> this thread, which seems to be disliked by many due to its requiring
> closed intervals while other Python features use half-open ones.
well, while on the topic why not go for full math notation?
for i in [0,1,..,5), (0,1,..,5], etc.
That would satisfy all math options for semi-open, semi-closed
intervals, and send every brace-matching text editor on the face of
this planet into a fit :-)
I get a feeling this PEP isn't going to get too far...
It's late. Time to go to bed.
More information about the Python-list