Skip to content

[3.6] bpo-33595: Fix lambda parameters being refered as arguments (GH-7037) #7041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,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 @@ -1571,12 +1571,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