[Python-Dev] [Python-ideas] Coroutines and PEP 380
mark at hotpy.org
Thu Jan 26 10:30:45 CET 2012
Nick Coghlan wrote:
> (redirecting to python-ideas - coroutine proposals are nowhere near
> mature enough for python-dev)
> On Wed, Jan 25, 2012 at 5:35 PM, Matt Joiner <anacrolix at gmail.com> wrote:
>> If someone can explain what's stopping real coroutines being into
>> Python (3.3), that would be great.
> The general issues with that kind of idea:
> - the author hasn't offered the code for inclusion and relicensing
> under the PSF license (thus we legally aren't allowed to do it)
If by the author you mean me, then of course it can be included.
Since it is a fork of CPython and I haven't changed the licence
I assumed it already was under the PSF licence.
> - complexity
> - maintainability
Hard to measure, but it adds about 200 lines of code.
> - platform support
Its all fully portable standard C.
> In the specific case of coroutines, you have the additional hurdle of
> convincing people whether or not they're a good idea at all.
That may well be the biggest obstacle :)
One other obstacle (and this may be a killer) is that it may not be
practical to refactor Jython to use coroutines since Jython compiles
Python direct to JVM bytecodes and the JVM doesn't support coroutines.
Jython should be able to support yield-from much more easily.
More information about the Python-Dev