Open
Description
In code like this we should iterate over the rvalue first before performing any assignments to match Python semantics:
o.x, o.y = it
We currently interleave assignments and iteration in some cases. The evaluation order is correct if the rvalue is a list or a tuple, but not for arbitrary iterables. Assignments and iteration can have side effects, so in some edge cases these two approaches will produce different results.
Dealing with *x
lvalues may make the implementation somewhat tricky (not sure though).
For more context, see python/mypy#9800 (review).