PEP 276 Simple Iterator for ints (fwd)

David Eppstein eppstein at ics.uci.edu
Thu Nov 15 17:04:08 EST 2001


In article <2YTI7.30749$vQ1.1137481 at atlpnn01.usenetserver.com>,
 "Steve Holden" <sholden at holdenweb.com> wrote:

> Whether or not either comma is (even optionally) necessary syntactically,
> the main problem with any such representation is the impedance mismatch with
> [x]range(), which are built on the half-open interval. Particularly
> difficult to explain the mismatch to newbies, I think.
> 
> If I have a vote, I'm afraid it's -1

OK, but my problem is precisely the impedance mismatch between range and 
newbies -- do you really think that they come pre-equipped with an 
understanding of range and half-open intervals?  I am happy enough with 
[x]range when it comes to programs that I write for myself, but would like 
a more intuitive syntax for using in algorithms lectures where I can't 
expect the students to know Python syntax.

It sounds like too many Pythonists see this as a non-problem, so it is 
unlikely to change and I will continue using non-Python for my lectures.
-- 
David Eppstein       UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/



More information about the Python-list mailing list