summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorIvan Levkivskyi <levkivskyi@gmail.com>2019-06-04 10:37:46 (GMT)
committerGitHub <noreply@github.com>2019-06-04 10:37:46 (GMT)
commit8bcf2629a2e27267edba98fd3b5ed274b25aeb2d (patch)
tree864ed740c37831641de90c9c631790a91171dfb3 /Doc
parent4cdbc452ce308bb55523e53963cabdc988e3f44b (diff)
downloadcpython-8bcf2629a2e27267edba98fd3b5ed274b25aeb2d.zip
cpython-8bcf2629a2e27267edba98fd3b5ed274b25aeb2d.tar.gz
cpython-8bcf2629a2e27267edba98fd3b5ed274b25aeb2d.tar.bz2
More updates to the annotated assignments docs (GH-13794)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/reference/simple_stmts.rst7
1 files changed, 3 insertions, 4 deletions
diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst
index 9c0430d..0a043a9 100644
--- a/Doc/reference/simple_stmts.rst
+++ b/Doc/reference/simple_stmts.rst
@@ -330,10 +330,9 @@ statement, of a variable or attribute annotation and an optional assignment stat
.. productionlist::
annotated_assignment_stmt: `augtarget` ":" `expression`
- : ["=" (`expression_list` | `yield_expression`)]
+ : ["=" (`starred_expression` | `yield_expression`)]
-The difference from normal :ref:`assignment` is that only single target and
-only single right hand side value is allowed.
+The difference from normal :ref:`assignment` is that only single target is allowed.
For simple names as assignment targets, if in class or module scope,
the annotations are evaluated and stored in a special class or module
@@ -369,7 +368,7 @@ target, then the interpreter evaluates the target except for the last
.. versionchanged:: 3.8
Now annotated assignments allow same expressions in the right hand side as
- the augmented assignments. Previously, some expressions (like un-parenthesized
+ the regular assignments. Previously, some expressions (like un-parenthesized
tuple expressions) caused a syntax error.