Egor Bolonev wrote:
why functions created with lambda forms cannot contain statements?

syntax/technical answer: because lambda is an expression and it is not obvious how the syntax for 'statement inside expression' should be


'Python is perfect' answer: if a function contains more than an expression, then it's complex enough to require a name

how to get unnamed function with statements?

You can't. See various threads about Smalltalk/Ruby-like blocks and the recent one about the 'where' keyword for proposals to change this


Daniel
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to