PEP 276 Simple Iterator for ints

Jeff Shannon jeff at ccvcorp.com
Thu Nov 15 13:55:06 EST 2001


David Eppstein wrote:

> You seem to be inconsistent here about whether  you want these ranges to be
> open or closed on the right.  I think closed is the only reasonable
> choice for this syntax.

Which is exactly why I think that the Haskell-ish syntax is a bad idea.  This
syntax cries out to be a closed interval, and it would be very confusing if
used as a half-open interval.  But that would make it the *only* case of
Python using a closed interval.  I find that inconsistency to be *far* more
jarring than the use of range().

Jeff Shannon
Technician/Programmer
Credit International





More information about the Python-list mailing list