You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
@starrohan999 You can go ahead and work on this. We don't use issue assignments very consistently, since they get easily out of date. They mostly act as reminders for the assignees.
In code like this we should iterate over the rvalue first before performing any assignments to match Python semantics:
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).
The text was updated successfully, but these errors were encountered: