
Aug. 14, 2010
4:01 a.m.
Scott Dial wrote:
On 8/13/2010 4:11 AM, Greg Ewing wrote:
That's not actually true -- a for-loop would work with any iterable node object just as well.
I agree that it works, but it does not avoid the recursion-depth problem and you pay for the decent through all of the for-loops.
To clarify, I was responding only to the point that yield-from deals with any kind of iterator, not just another generator. I was pointing out that, to the extent that a for-loop handles generators, it also handles other iterables as well. -- Greg