Kirill Balunov wrote:
So someone too perlish
clever can assume that with the proposed syntax:
>>> def gen():
>>> for i in ['a', 'b', 'c', 'd']:
>>> v = x if 'x' in globals() else 'var '
>>> yield v + i
>>> x, y = gen()
>>> x
var a
>>> y
var ab
There's no need for that to happen. It can still unpack all the values
it needs before performing any assignments.
--
Greg
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/