Skip to content

Commit 8bcf262

Browse files
authored
More updates to the annotated assignments docs (GH-13794)
1 parent 4cdbc45 commit 8bcf262

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Doc/reference/simple_stmts.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,9 @@ statement, of a variable or attribute annotation and an optional assignment stat
330330

331331
.. productionlist::
332332
annotated_assignment_stmt: `augtarget` ":" `expression`
333-
: ["=" (`expression_list` | `yield_expression`)]
333+
: ["=" (`starred_expression` | `yield_expression`)]
334334

335-
The difference from normal :ref:`assignment` is that only single target and
336-
only single right hand side value is allowed.
335+
The difference from normal :ref:`assignment` is that only single target is allowed.
337336

338337
For simple names as assignment targets, if in class or module scope,
339338
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
369368

370369
.. versionchanged:: 3.8
371370
Now annotated assignments allow same expressions in the right hand side as
372-
the augmented assignments. Previously, some expressions (like un-parenthesized
371+
the regular assignments. Previously, some expressions (like un-parenthesized
373372
tuple expressions) caused a syntax error.
374373

375374

0 commit comments

Comments
 (0)