diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2004-06-02 12:54:33 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2004-06-02 12:54:33 (GMT) |
commit | 477c85631a95d6f0ce49f8651bb73f2bfc950493 (patch) | |
tree | 63bc2d569507235d522e8c550e20adc3273e5a76 /Doc/ref/ref5.tex | |
parent | 13ff116ac7b753a53aab78e8f8cadc2021ca4292 (diff) | |
download | cpython-477c85631a95d6f0ce49f8651bb73f2bfc950493.zip cpython-477c85631a95d6f0ce49f8651bb73f2bfc950493.tar.gz cpython-477c85631a95d6f0ce49f8651bb73f2bfc950493.tar.bz2 |
Move grammar rule for lambda_form into section on lambdas. Fixes #964525.
Diffstat (limited to 'Doc/ref/ref5.tex')
-rw-r--r-- | Doc/ref/ref5.tex | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/ref/ref5.tex b/Doc/ref/ref5.tex index cb181d5..27127ad 100644 --- a/Doc/ref/ref5.tex +++ b/Doc/ref/ref5.tex @@ -967,8 +967,6 @@ Boolean operations have the lowest priority of all Python operations: {\token{not_test} | \token{and_test} "and" \token{not_test}} \production{not_test} {\token{comparison} | "not" \token{not_test}} - \production{lambda_form} - {"lambda" [\token{parameter_list}]: \token{expression}} \end{productionlist} In the context of Boolean operations, and also when expressions are @@ -1006,6 +1004,11 @@ not \code{''}.) \indexii{lambda}{form} \indexii{anonymous}{function} +\begin{productionlist} + \production{lambda_form} + {"lambda" [\token{parameter_list}]: \token{expression}} +\end{productionlist} + Lambda forms (lambda expressions) have the same syntactic position as expressions. They are a shorthand to create anonymous functions; the expression \code{lambda \var{arguments}: \var{expression}} |