[Python-Dev] Coroutines and PEP 380 (original) (raw)
Matt Joiner anacrolix at gmail.com
Wed Jan 25 08:35:30 CET 2012
- Previous message: [Python-Dev] Coroutines and PEP 380
- Next message: [Python-Dev] cpython: Implement PEP 380 - 'yield from' (closes #11682)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
After much consideration, and playing with PEP380, I've changed my stance on this. Full blown coroutines are the proper way forward. greenlet doesn't cut it because the Python interpreter isn't aware of the context switches. Profiling, debugging and tracebacks are completely broken by this. Stackless would need to be merged, and that's clearly not going to happen.
I built a basic scheduler and had a go at "enhancing" the stdlib using PEP380, here are some examples making use of this style: https://bitbucket.org/anacrolix/green380/src/8f7fdc20a8ce/examples
After realising it was a dead-end, I read up on Mark's ideas, there's some really good stuff in there: http://www.dcs.gla.ac.uk/~marks/ http://hotpy.blogspot.com/
If someone can explain what's stopping real coroutines being into Python (3.3), that would be great.
- Previous message: [Python-Dev] Coroutines and PEP 380
- Next message: [Python-Dev] cpython: Implement PEP 380 - 'yield from' (closes #11682)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]