PEP 276 Simple Iterator for ints (fwd)
Greg Ewing
greg at cosc.canterbury.ac.nz
Wed Nov 28 18:40:36 EST 2001
More information about the Python-list mailing list
Wed Nov 28 18:40:36 EST 2001
- Previous message (by thread): PEP 276 Simple Iterator for ints (fwd)
- Next message (by thread): PEP 276 Simple Iterator for ints (fwd)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Jeff Shannon wrote: > > David Eppstein wrote: > > > I don't care for it -- is it really natural and intuitive > > that "x in y" should be equivalent to "0 <= x < y" when x and y are both > > ints? > > PEP 276 does not make an integer equivalent to the > list of natural numbers ending below it; I think the point Mr. Eppstein was making is that "for i in seq" can be read as "for all values of i such that i in seq is true". PEP 276 would break that, because "for i in 5" couldn't sensibly be read as "for all values of i such that i in 5 is true", unless "i in 5" on its own were valid and had a rather unintuitive meaning. -- Greg Ewing, Computer Science Dept, University of Canterbury, Christchurch, New Zealand To get my email address, please visit my web page: http://www.cosc.canterbury.ac.nz/~greg
- Previous message (by thread): PEP 276 Simple Iterator for ints (fwd)
- Next message (by thread): PEP 276 Simple Iterator for ints (fwd)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list