Doctest failing

Ben Finney ben+python at
Mon Sep 12 03:37:10 CEST 2011

Chris Angelico <rosuav at> writes:

> A lambda is basically a function defined in an expression. For instance:
> def add_one(x):
>    return x+1
> is (practically) the same as:
> add_one = lambda x: x+1

Those are only practically the same if you ignore the practical worth of
a function knowing the name it was defined with. The latter does not
have that, hence I don't see it as practically the same as the former.

 \     “The Vatican is not a state.… a state must have territory. This |
  `\         is a palace with gardens, about as big as an average golf |
_o__)                         course.” —Geoffrey Robertson, 2010-09-18 |
Ben Finney

More information about the Python-list mailing list