Is this a good use for lambda

Duncan Booth duncan.booth at invalid.invalid
Mon Dec 20 03:53:51 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.  It's a good point, and reasonable
> people can disagree about whether the namespace pollution or the
> unreadability of lambda is a bigger problem.  
> 

Are you using some special version of Python with only one namespace? My 
copy came complete with a variety of useful namespaces and even lets me 
define my own. For example I have local namespaces inside functions which 
let me ignore the names I have used in the function everywhere outside the 
function.



More information about the Python-list mailing list