What are co-routines?

William Dandreta wjdandreta at worldnet.att.net
Sat May 26 17:58:36 CEST 2001


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 I
say) splintering of C/C++/Java coding styles is due to the placement of the
{ 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