> OK, you want "lazy evaluation", but only in a very specific case. Specific but intuitive, useful and efficient, nevertheless. > MUST continue to ensure each of a and b is called before > whatever is -- both for backwards compatibility AND to respect > the principle of least astonishment Well, that a dict's "setdefault" method invokes the argument function only when necessary is far more intuitive and logical to me than current situation. In fact there are already precendents, like boolean AND construction, for example. Or the vary same "zip" built-in lazy parameters evaluation works, for example. Yes, lazy evaluation should be very useful although generators and iterators helps a lot. But it is not the point that I'd like to study here :-). By the way, thanks for your (and David Ascher) "Python CookBook". I only read 1/3 so far, but my money is already well paid :-). Last night I went to bet at 4:30 in the morning... };-) -- Jesus Cea Avion _/_/ _/_/_/ _/_/_/ jcea@argo.es http://www.argo.es/~jcea/ _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ _/_/_/_/_/ PGP Key Available at KeyServ _/_/ _/_/ _/_/ _/_/ _/_/ "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/ "El amor es poner tu felicidad en la felicidad de otro" - Leibniz
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4