Is this a good use for lambda

Fredrik Lundh fredrik at pythonware.com
Sun Dec 19 14:59:43 EST 2004


Walter S. Leipold wrote:

> I think that Charlie's point is that, when you use "def <name>", you have
> <name> polluting your namespace.  The whole program becomes harder to
> understand because you can't ignore <name> anywhere, even if it was only
> ever intended to be used in one place.

Ahem.  If you name the function, you can reuse the name (or just forget about it)
as soon as you've used the function object.

If you don't want to reuse the name because you might want to reuse the function
object, you have to name it anyway.

</F> 






More information about the Python-list mailing list