Commit 804fcf66 authored by Terry Jan Reedy's avatar Terry Jan Reedy Committed by GitHub

[2.7] bpo-33595: Fix lambda parameters being refered as arguments (GH-7037) (GH-7122)

(cherry picked from commit 268cc7c3)

Co-authored-by: Andrés Delfino adelfino@gmail.com
parent 19f6bd06
......@@ -457,7 +457,7 @@ Glossary
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
......
......@@ -1390,10 +1390,10 @@ Lambdas
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment