>>>>> "Douglas" == Douglas Alan <[EMAIL PROTECTED]> writes:
Douglas> If you actually try doing this, you will see why I want Douglas> "yield_all". Oh... I see your point. I was about to suggest that the code in my posts before should be made to work somehow. I mean, if in def fun1(x): if not x: raise MyErr() ... def fun2(): ... fun1(val) fun2() we can expect that main gets the exception thrown by fun1, why in def fun1(x): if not x: yield MyObj() ... def fun2(): fun1(val) for a in fun2(): ... we cannot expect MyObj() to be yielded to main? But soon I found that it is not realistic: there is no way to know that fun2 has generator semantics. Perhaps that is a short-sightness in not introducing a new keyword instead of def when defining generators. Regards, Isaac. -- http://mail.python.org/mailman/listinfo/python-list