[Python-ideas] Unpacking iterables for augmented assignment

James Lu jamtlu at gmail.com
Sat Aug 25 13:56:20 EDT 2018


I propose we apply PEP 3132 to PEP 203. That is, for every statement where
"<lhs> = <rhs>" is valid I propose "lhs += rhs" should also be valid.

Simple example:
a = 0
b = 0
a, b += 1, 2
# a is now 1
# b is now 2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180825/591f2ec1/attachment.html>


More information about the Python-ideas mailing list