aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmily Morehouse <emily@cuttlesoft.com>2019-09-11 15:37:12 +0100
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-09-11 07:37:12 -0700
commit6357c95716d89ac1f80587fbc4133df8d2e8396c (patch)
treea1881762e3dae76cd14c2bc1ddbbdae5ec4ecef9 /Doc/reference
parentbpo-37972: unittest.mock._Call now passes on __getitem__ to the __getattr__ c... (diff)
downloadcpython-6357c95716d89ac1f80587fbc4133df8d2e8396c.tar.gz
cpython-6357c95716d89ac1f80587fbc4133df8d2e8396c.tar.bz2
cpython-6357c95716d89ac1f80587fbc4133df8d2e8396c.zip
bpo-35224: Additional documentation for Assignment Expressions (GH-15935)
Add or update assignment expression documentation for: - FAQ - Design - Reference - Expressions - Reference - Lexical Analysis https://bugs.python.org/issue35224 Automerge-Triggered-By: @matrixise
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/expressions.rst2
-rw-r--r--Doc/reference/lexical_analysis.rst2
2 files changed, 3 insertions, 1 deletions
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
index 73a2f271ca5..d9db33a7856 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -1784,6 +1784,8 @@ precedence and have a left-to-right chaining feature as described in the
+-----------------------------------------------+-------------------------------------+
| Operator | Description |
+===============================================+=====================================+
+| ``:=`` | Assignment expression |
++-----------------------------------------------+-------------------------------------+
| :keyword:`lambda` | Lambda expression |
+-----------------------------------------------+-------------------------------------+
| :keyword:`if <if_expr>` -- :keyword:`!else` | Conditional expression |
diff --git a/Doc/reference/lexical_analysis.rst b/Doc/reference/lexical_analysis.rst
index 7e1e17edb2d..c0e13b53698 100644
--- a/Doc/reference/lexical_analysis.rst
+++ b/Doc/reference/lexical_analysis.rst
@@ -887,7 +887,7 @@ The following tokens are operators:
+ - * ** / // % @
- << >> & | ^ ~
+ << >> & | ^ ~ :=
< > <= >= == !=