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.)          |
[EMAIL PROTECTED]          +--------------------------------------+
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to