On 2009-09-25, Simon Forman <sajmik...@gmail.com> wrote: > On Fri, Sep 25, 2009 at 11:42 AM, Grant Edwards <inva...@invalid.invalid> > wrote:
>> You can't call a function that yields control back to the other >> coroutine(s). ?By jumping through some hoops you can get the >> same effect, but it's not very intuitive and it sort of "feels >> wrong" that the main routine has to know ahead of time when >> calling a function whether that function might need to yield or >> not. > > You mean a "trampoline" function? I.e. you have to call into your > coroutines in a special main function that expects as part of the > yielded value(s) the next coroutine to pass control to, and your > coroutines all need to yield the next coroutine? Exactly. Compared to "real" coroutines where a yield statement can occur anywhere, the trampoline business seems pretty convoluted. -- Grant Edwards grante Yow! Do you think the at "Monkees" should get gas on visi.com odd or even days? -- http://mail.python.org/mailman/listinfo/python-list