[Python-ideas] How assignment should work with generators?
Guido van Rossum
guido at python.org
Mon Nov 27 16:18:48 EST 2017
On Mon, Nov 27, 2017 at 1:13 PM, Greg Ewing <greg.ewing at canterbury.ac.nz>
> Chris Angelico wrote:
> x, y, * = iter # unpack into nothing
> I'm surprised this isn't already allowed. It seems like the
> One Obvious Way to me.
I'm not that surprised. While it appears to rhyme with the use of a lone
'*' in function signatures, it would actually mean the opposite: in
signatures it means "don't allow any more". These opposite meanings would
cause some confusion.
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas