]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[2.7] bpo-33595: Fix lambda parameters being refered as arguments (GH-7037) (GH-7122)
authorTerry Jan Reedy <tjreedy@udel.edu>
Fri, 25 May 2018 18:38:09 +0000 (14:38 -0400)
committerGitHub <noreply@github.com>
Fri, 25 May 2018 18:38:09 +0000 (14:38 -0400)
(cherry picked from commit 268cc7c)

Co-authored-by: Andrés Delfino adelfino@gmail.com
Doc/glossary.rst
Doc/reference/expressions.rst

index feb40a88bbed6b5fbb122051e708e99421ed5855..cacf3f6c24ac838f090049ca103ba6c55318df26 100644 (file)
@@ -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
index 8556fa810f6cb3c81f40a8ca48150cf030e46cc8..7fbfae747f6f41fe0e037c77d342602fd4427b08 100644 (file)
@@ -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