From: Terry Jan Reedy Date: Fri, 25 May 2018 18:38:09 +0000 (-0400) Subject: [2.7] bpo-33595: Fix lambda parameters being refered as arguments (GH-7037) (GH-7122) X-Git-Tag: v2.7.16rc1~293 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=804fcf66559992db9d23695e501c502ab20b7712;p=thirdparty%2FPython%2Fcpython.git [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 --- diff --git a/Doc/glossary.rst b/Doc/glossary.rst index feb40a88bbed..cacf3f6c24ac 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 8556fa810f6c..7fbfae747f6f 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 (parameters): return expression See section :ref:`function` for the syntax of parameter lists. Note that