Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 1
    multi line is about the insert of the '\n' character :D python does not have multi statement lambda. You really want to use def. Think about it: you really need a callable as a parameter of your function? And the users of that function aren't allowed to pass your default callable? How can they pass it if you don't give it to them? Commented Aug 7, 2011 at 18:14
  • btw, can you provide an example of your need of an anonimous function? Commented Aug 7, 2011 at 18:19
  • 1
    Yeah, I find the limitation of a single expression really frustrating. True, that if they allow multi-expression lambdas people will most certainly start to abuse it but the other way around is too restrictive omho. Commented Feb 21, 2016 at 0:05