[Python-3000] [Python-Dev] Python 3000 Status Update (Long!)
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Jun 28 02:37:20 CEST 2007
Russell E. Owen wrote:
> I would personally be happy lose set comprehensions and just use
> generator expressions for all comprehension-like tasks.
One advantage of the comprehension syntaxes is that the
body can be inlined instead of relegated to a lambda,
saving the overhead of a Python function call per
loop.
It would be difficult to do that optimisation with
a generator unless things like list(generator) were
recognised and special-cased somehow.
--
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | Carpe post meridiem! |
Christchurch, New Zealand | (I'm not a morning person.) |
greg.ewing at canterbury.ac.nz +--------------------------------------+
More information about the Python-3000
mailing list