"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | On Sat, 23 Feb 2008 19:35:30 -0800, Jeff Schwab wrote: | | > Every time somebody uses | > lambda here, they seem to get a bunch "why are you using lambda?" | > responses.
I think you are overgeneralizing ;-) I use 'em. | Not from me. | | I even use "named anonymous functions" *cough* by assigning lambda | functions to names: | | foo = lambda x: x+1 Even though I consider the above to be clearly inferior to def foo(x): return x+1 since the latter names the function 'foo' instead of the generic '<lambda>'. The only other situation in which I would critisize lambda usage are multi-line (or super-long-line) monstrousities that are not intentionally 'obfuscated Python'. tjr -- http://mail.python.org/mailman/listinfo/python-list