mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Fix lambda parameters being refered as arguments (GH-7037)
This commit is contained in:
committed by
Julien Palard
parent
b7555babe9
commit
268cc7c3f8
@@ -627,7 +627,7 @@ Glossary
|
|||||||
lambda
|
lambda
|
||||||
An anonymous inline function consisting of a single :term:`expression`
|
An anonymous inline function consisting of a single :term:`expression`
|
||||||
which is evaluated when the function is called. The syntax to create
|
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
|
LBYL
|
||||||
Look before you leap. This coding style explicitly tests for
|
Look before you leap. This coding style explicitly tests for
|
||||||
|
|||||||
@@ -1608,12 +1608,12 @@ Lambdas
|
|||||||
lambda_expr_nocond: "lambda" [`parameter_list`]: `expression_nocond`
|
lambda_expr_nocond: "lambda" [`parameter_list`]: `expression_nocond`
|
||||||
|
|
||||||
Lambda expressions (sometimes called lambda forms) are used to create anonymous
|
Lambda expressions (sometimes called lambda forms) are used to create anonymous
|
||||||
functions. The expression ``lambda arguments: expression`` yields a function
|
functions. The expression ``lambda parameters: expression`` yields a function
|
||||||
object. The unnamed object behaves like a function object defined with:
|
object. The unnamed object behaves like a function object defined with:
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
def <lambda>(arguments):
|
def <lambda>(parameters):
|
||||||
return expression
|
return expression
|
||||||
|
|
||||||
See section :ref:`function` for the syntax of parameter lists. Note that
|
See section :ref:`function` for the syntax of parameter lists. Note that
|
||||||
|
|||||||
Reference in New Issue
Block a user