What are co-routines?

Emile van Sebille emile at fenx.com
Sat May 26 12:14:26 EDT 2001

Snipped from (watch out for wrapping):


Tim Peters about coroutines can be found here:

More on coroutines by Sam Rushing:

On Scheme, continuations, generators and coroutines:



Emile van Sebille
emile at fenx.com

"William Dandreta" <wjdandreta at worldnet.att.net> wrote in message
news:MoQP6.1019$kh4.95660 at bgtnsc04-news.ops.worldnet.att.net...
> I read the following from
> http://www.softpanorama.org/Scripting/true_python.shtml :
> "BTW one of the shortcomings of Python as a scripting language is that it
> does not support co-routines (BTW co-routines are supported in Modula-2).
> There is a flavor of  Python called stack less Python that support them
> though, but this feature definitely should be included in the language if
> Python wants successfully compete with Perl. Perl is already entrenched
> language and you need to do several things a lot better to attract a
> significant numbers of Perl developers. I still prefer Perl to Python
> despite all Perl shortcomings.
> The syntactic indenting in Python is actually extremely cool. That means
> that you need a pretty decent editor but we knew that already right? The
> main benefit I see to syntactic indenting is that is narrows down the
> possible range of coding styles. If you think about it, most of the (dare
> say) splintering of C/C++/Java coding styles is due to the placement of
> { and } symbols. This acts against readability for other developers. It's
> also less typing."
> What are co-routines and why would they be a useful addition to Python?
> Bill

More information about the Python-list mailing list