On Fri, Apr 28, 2017, at 01:30, Chris Angelico wrote: > Nothing whatsoever says that this is a good idea, but it's perfectly > legal, because the for loop is defined in terms of assignment. If this > were to be accepted (which, fwiw, I'm not actually advocating, but > IF), it would also be defined in terms of assignment. You still > shouldn't be assigning to arbitrary objects, especially not randomly > rebinding module names, but it's easy to grok the assignment > equivalence.
What's not clear is when the left side (an object whose attribute/item is being assigned, and the item index) is evaluated, and why this should be different from when default arguments are evaluated. _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/