[Python-ideas] Revised^4 PEP on yield-from
solipsis at pitrou.net
Fri Feb 20 00:16:26 CET 2009
Greg Ewing <greg.ewing at ...> writes:
> It's also a totally unreasonable amount of obfuscation to
> endure just to be able to traverse the tree with a generator.
Greg, I find this qualification ("obfuscation") a bit offensive...
It's certainly a matter of taste, and, while it's less straightforward than an
explicitly recusive traversal, I don't find that particular chunk of code
obfuscated at all. To me, it's not harder to understand than the various
examples of "yield from" use you have posted to justify that feature.
(and, actually, I don't understand how "yield from" helps for a depth-first
traversal. Could you post an example of it?)
More information about the Python-ideas