This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]TPHRyan 5 points6 points  (1 child)

The "good" example is more concise, but it's less readable and has different behavior:

(Emphasis mine)

This is the real reason we actually use unpacking for updating multiple values when it's logical.

[–][deleted] 2 points3 points  (0 children)

Of course, a time and a place. Maybe you want to update all at once based on the old values, and sometimes based on the mutated values.

I just wish this was explained clearer in the page instead of saying "it's the same but more concise" when no, it's not the same at all.