diff options
author | Georg Brandl <georg@python.org> | 2013-10-06 08:28:48 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2013-10-06 08:28:48 (GMT) |
commit | 6930777c63899e25ad5bb1033da8294f7aaedd4e (patch) | |
tree | 6bdb05ac995debacf810f2ebfe59177ccdb7ab5e /Doc/reference/compound_stmts.rst | |
parent | ce28e2c24b4c8bbead80f0ef0e948daff3ba4be6 (diff) | |
parent | 242e6a0bce9143c62262817b17b46d32a3c916a3 (diff) | |
download | cpython-6930777c63899e25ad5bb1033da8294f7aaedd4e.zip cpython-6930777c63899e25ad5bb1033da8294f7aaedd4e.tar.gz cpython-6930777c63899e25ad5bb1033da8294f7aaedd4e.tar.bz2 |
merge with 3.3
Diffstat (limited to 'Doc/reference/compound_stmts.rst')
-rw-r--r-- | Doc/reference/compound_stmts.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index c25c767..e35aa9f 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -536,17 +536,17 @@ function. The annotation values are available as values of a dictionary keyed by the parameters' names in the :attr:`__annotations__` attribute of the function object. -.. index:: pair: lambda; form +.. index:: pair: lambda; expression It is also possible to create anonymous functions (functions not bound to a -name), for immediate use in expressions. This uses lambda forms, described in -section :ref:`lambda`. Note that the lambda form is merely a shorthand for a +name), for immediate use in expressions. This uses lambda expressions, described in +section :ref:`lambda`. Note that the lambda expression is merely a shorthand for a simplified function definition; a function defined in a ":keyword:`def`" statement can be passed around or assigned to another name just like a function -defined by a lambda form. The ":keyword:`def`" form is actually more powerful +defined by a lambda expression. The ":keyword:`def`" form is actually more powerful since it allows the execution of multiple statements and annotations. -**Programmer's note:** Functions are first-class objects. A "``def``" form +**Programmer's note:** Functions are first-class objects. A "``def``" statement executed inside a function definition defines a local function that can be returned or passed around. Free variables used in the nested function can access the local variables of the function containing the def. See section |