(cherry picked from commit
268cc7c)
Co-authored-by: Andrés Delfino adelfino@gmail.com
lambda
An anonymous inline function consisting of a single :term:`expression`
which is evaluated when the function is called. The syntax to create
- a lambda function is ``lambda [arguments]: expression``
+ a lambda function is ``lambda [parameters]: expression``
LBYL
Look before you leap. This coding style explicitly tests for
Lambda expressions (sometimes called lambda forms) have the same syntactic position as
expressions. They are a shorthand to create anonymous functions; the expression
-``lambda arguments: expression`` yields a function object. The unnamed object
+``lambda parameters: expression`` yields a function object. The unnamed object
behaves like a function object defined with ::
- def name(arguments):
+ def <lambda>(parameters):
return expression
See section :ref:`function` for the syntax of parameter lists. Note that