expression form of one-to-many dict?

Doug Holton insert at spam.here
Mon Dec 20 23:40:02 EST 2004


Mike Meyer wrote:

> Personally, I'd love a language feature that let you create a function
> that didn't evaluate arguments until they were actually used - lazy
> evaluation. That lets you write the C ?: operator as a function, for
> a start.
> 
> Hmmm. No, iterators can't be used to fake it. Oh well.

That is a brilliant idea.  I would suggest requesting such a feature for 
Python 3.0: http://www.python.org/cgi-bin/moinmoin/Python3.0

However, Python 3.0 is likely years away.  If you want to know how to 
use this feature today, consult Fredrik Lundh.



More information about the Python-list mailing list