[Python-ideas] yield from multiple iterables (was Re: The async API of the future: yield-from)

Nick Coghlan ncoghlan at gmail.com
Sun Oct 21 04:18:31 CEST 2012

On Sun, Oct 21, 2012 at 2:30 AM, Guido van Rossum <guido at python.org> wrote:
> On Fri, Oct 19, 2012 at 10:37 PM, Greg Ewing
> <greg.ewing at canterbury.ac.nz> wrote:
>> Nick Coghlan wrote:
>>> Please don't lose sight of the fact that yield-based suspension points
>>> looking like something other than an ordinary function call is a
>>> *feature*, not a bug.
> (Ironically, Christian just revived an old thread where Nick was of a
> different opinion.)

I like greenlets too, just for the ease of converting the scaling
constraints of existing concurrent code from
number-of-threads-per-process to number-of-open-sockets-per-process.

I've come to the conclusion that they're no substitute for explicitly
asynchronous code, though, and the assembler magic needed to make them
work with arbitrary C code (either in the language core or in C
extensions) makes them a poor fit for the standard library.


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list