Status of PEP's?

David Eppstein eppstein at ics.uci.edu
Fri Mar 1 20:10:26 EST 2002


In article <3C802175.A527BFA0 at ccvcorp.com>,
 Jeff Shannon <jeff at ccvcorp.com> wrote:

> > [x for 3 <= x < 10]
> 
> Personally, I still don't see this as being an advantage over xrange(3,10).

Ok, quick, what if you want to loop over the same values in reverse order?

.
.
.
a
n
s
w
e
r
:
.
.
.

[x for 10 > x >= 3]
or 
xrange(9,2,-1)

Now which is easier to come up with?
-- 
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