
Feb. 20, 2009
12:16 a.m.
Greg Ewing <greg.ewing@...> 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?) Regards Antoine.