Paddy McCarthy wrote:
x=lambda : A < B
y=lambda : C+6 >= 7

[snip]

Z=lambda : (A<B) and (C+6>=7)

See "Inappropriate use of Lambda" in http://www.python.org/moin/DubiousPython

Perhaps your real example is different, but notice that
<name> = lambda <args>: <expr>
is equivalent to
def <name>(<args>):
return <expr>
except that the latter will give your function a useful name. No reason to use the *anonymous* function construct to create a *named* function.


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

Reply via email to