[Tutor] lambda in python

john tsolox tsolox at gmail.com
Sat Nov 27 02:23:40 CET 2010

since in Java i can pass an anonymous class to a function, and this anon class has member functions that can contain a
body of implementation codes having the full expression of permissible syntax (if,for,while...), my question is, after
seeing various examples of lambda in python being ALL one-liners. These one-liners inside a lambda seems not to have the
full permissible use of the full power of python language (if,for,while). Is this correct?

Is it correct to say, that within python lambda, you are not allowed to use 'if' ? pls enlighten...

More information about the Tutor mailing list