PEP 284, Integer for-loops

David Eppstein eppstein at ics.uci.edu
Wed Mar 6 21:08:30 EST 2002


In article <mailman.1015461984.1986.python-list at python.org>,
 "Delaney, Timothy" <tdelaney at avaya.com> wrote:

> "PEP 274 [4] proposes to make integers iterable by implementing __iter__,
> simplifying ...
> 
> I would also possibly add the discussion of what iter(-x) should mean i.e.
> either counting up from -x to 0 (upper bound exclusive, matches slice
> semantics), or counting down from 0 to -x (upper bound exclusive, useful for
> traversing sequences in reverse order).

You would add a summary of this discussion to PEP 284's description of 
PEP 274?  I didn't want to get too detailed, just provide appropriate 
citations so readers could look up the relevant related proposals.



More information about the Python-list mailing list