diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2018-05-25 18:38:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-25 18:38:09 (GMT) |
commit | 804fcf66559992db9d23695e501c502ab20b7712 (patch) | |
tree | 4705abfda2681458185a4ebca50f746681742f36 | |
parent | 19f6bd06af3c7fc0db5f96878aaa68f5589ff13e (diff) | |
download | cpython-804fcf66559992db9d23695e501c502ab20b7712.zip cpython-804fcf66559992db9d23695e501c502ab20b7712.tar.gz cpython-804fcf66559992db9d23695e501c502ab20b7712.tar.bz2 |
[2.7] bpo-33595: Fix lambda parameters being refered as arguments (GH-7037) (GH-7122)
(cherry picked from commit 268cc7c)
Co-authored-by: Andrés Delfino adelfino@gmail.com
-rw-r--r-- | Doc/glossary.rst | 2 | ||||
-rw-r--r-- | Doc/reference/expressions.rst | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst index feb40a8..cacf3f6 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -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 diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index 8556fa8..7fbfae7 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -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 |