Author terry.reedy
Recipients akuchling, terry.reedy
Date 2013-08-03.20:58:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Functional Programming HowTo, near the end, has a section
Small functions and the lambda expression

To illustrate, it starts with
  adder = lambda x, y: x+y
  print_assign = lambda name, value: name + '=' + str(value)
which are now proscribed by PEP 8. "Always use a def statement instead of an assignment statement that binds a lambda expression directly to a name."

The text goes on to give the def equivalents and to discourage lambdas. "Which alternative is preferable? That’s a style question; my usual course is to avoid using lambda." But I think the section should instead start with lambda examples that would be acceptable in the stdlib.
Date User Action Args
2013-08-03 20:58:16terry.reedysetrecipients: + terry.reedy, akuchling
2013-08-03 20:58:16terry.reedysetmessageid: <>
2013-08-03 20:58:16terry.reedylinkissue18648 messages
2013-08-03 20:58:16terry.reedycreate