Antoine Pitrou wrote:

If it's really enough to understand and debug all corner cases of using "yield
from", then fair enough.

In the case where the subiterator is another generator and
isn't shared, it's intended to be a precise and complete
specification. That covers the vast majority of the use
cases I have in mind.

Most of the complexities arise from trying to pin down
what happens when the subiterator isn't a generator, or
is being shared by other code. I don't know how the
specification could be made any simpler for those cases
while still being complete.

Even so, the intention is that if you understand the
semantics in the generator case, the behaviour in the
other cases should be something reasonable and
unsurprising. I certainly don't expect users to memorize
either the expansion or the full text of the English
explanation.

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to