Status of PEP's?

David Eppstein eppstein at ics.uci.edu
Thu Feb 28 20:24:40 EST 2002


In article <mailman.1014944882.14890.python-list at python.org>,
 James_Althoff at i2.com wrote:

> Another issue that I have is that the syntax does not work outside of a
> for-loop header.  I want to be able to create integer intervals anywhere in
> my code, not just in the header of a for-loop.

[x for 3 <= x < 10]

or, for a slightly more complicated example: yesterday I wanted to iterate 
over powers of two:

[1L << x for 0 <= x < 1000]
-- 
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