Closed justanr closed 9 years ago
Thanks @justanr , I think someone already made a PR with a better example for this, I think we can close this issue for now. If you think it's not fixed yet feel free to open it again. I'll redeploy the new version of the book today so that the changes will be visible online.
The entry for using generalized unpacking for updating multiple variables at once has these examples:
The "bad" example:
And the "good" example:
And also makes the following claim:
Emphasis mine. However, the "good" example has different behavior as it uses the original values for each assignment:
I won't debate the "more concise" claim -- because it is -- but it's definitely less readable; however, adding parens goes a long way to delimited each update: