[Python-ideas] Cofunctions - Back to Basics

Paul Moore p.f.moore at gmail.com
Thu Oct 27 21:33:06 CEST 2011


On 27 October 2011 20:15, Arnaud Delobelle <arnodel at gmail.com> wrote:

>> That article states that Python has coroutines as of 2.5 -- that's
>> incorrect, isn't it?
>
> Generator functions + trampoline = coroutines

If I understand, the cofunctions of this thread aren't coroutines as
such, they are something intended to make writing coroutines easier in
some way. My problem is that it's not at all obvious how they help.
That's partly because the generator+trampoline idiom, although
possible, is not at all common so that there's little in the way of
examples, and even less in the way of common understanding, of how the
idiom works and what problems there are putting it into practice.

Paul.



More information about the Python-ideas mailing list