PEP 276 (was Re: Status of PEP's?)

David Eppstein eppstein at ics.uci.edu
Sat Mar 2 11:08:07 EST 2002


In article <a5ptsb$99s16$1 at ID-11957.news.dfncis.de>,
 "Emile van Sebille" <emile at fenx.com> wrote:

> "Carel Fellinger"
> > You specify that the
> > integer to iterate over should be possitive, why not allow for
> > negative values and do the sensible thing, like:
> > 
> >    >>> [i for i in -3]
> >    [-1, -2, -3]
> 
> If you change the sensible thing to mean:
> 
>   [-3, -2, -1]
> 
> I'd like it better.  ;-)

But that wouldn't be as useful for iterating backwards through lists.
Which is what most of this seems to be directed at, rather than anything to 
do with integers per se, so I wonder why we are trying to convert integers 
into lists of indices rather than converting the lists directly.
-- 
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