.. 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
.. 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.