removing list comprehensions in Python 3.0
Steven Bethard
steven.bethard at gmail.com
Wed Jul 13 10:30:03 EDT 2005
Edvard Majakari wrote:
> Steven Bethard <steven.bethard at gmail.com> writes:
>
>>$ python -m timeit "for x in (i for i in xrange(10)): y = x"
>>100000 loops, best of 3: 4.75 usec per loop
>
> Yowza! One of the features I really liked in Perl has shored Python island
> somewhere in the 2.4'ies, it seems[1]. Thanks for the tip!
[snip]
> But using -m makes it much more convenient.
Yup, it showed up in Python 2.4. Great, isn't it?
STeVe
More information about the Python-list
mailing list