Skip to content

Commit

Permalink
Fix lambda parameters being refered as arguments (GH-7037)
Browse files Browse the repository at this point in the history
  • Loading branch information
andresdelfino authored and JulienPalard committed May 22, 2018
1 parent b7555ba commit 268cc7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Doc/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,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
Expand Down
4 changes: 2 additions & 2 deletions Doc/reference/expressions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1608,12 +1608,12 @@ Lambdas
lambda_expr_nocond: "lambda" [`parameter_list`]: `expression_nocond`

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:

.. code-block:: none
def <lambda>(arguments):
def <lambda>(parameters):
return expression
See section :ref:`function` for the syntax of parameter lists. Note that
Expand Down

0 comments on commit 268cc7c

Please sign in to comment.