Let's make a working implementation of async functions in Python 2.1, also, why you might want to us
summary
A working async implementation for ancient Python is actually constructed: a custom yield from backfill implements delegation, a minimal channels via yield expressions restores bidirectional send/throw, and a tiny bytecode hack using sys.settrace plus code object patching suspends and resumes execution. The demo runs on Python 1.6 (claimed compatible with 2.1 era), leaves locals on self only, uses marshal to recreate code objects, and proves it works but also shows why modern async/await and VM opcodes are far safer and clearer.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:51Modern Python overwhelming
- 2:58Async functions importance
- 4:22Python 1.6 limits Twisted
- 5:24Modern async await syntax
- 6:28Yield from generator delegation
- 8:13Reimplementing generator delegation
- 10:01Bidirectional channels
- 12:06Suspendable functions Python 1.6
- 16:48Tracing execution sys.setrace
- 19:41Demo async Python 1.6
- 20:48Why newer Python preferable
- 23:39Evolution async Python
- 26:05Modern Python benefits
- 26:47Q&A
related talks
29mMake a working implementation of async functions in Python 2.1
01h 21mTUTORIAL: Async Python, Good it is
35mHow Do Python Coroutines Work?
56mLeveraging Async and Await in Modern Python
30mLet's get you started with asynchronous programming
33mArtisanal Async Adventures
31mA Really Gentle Introduction to Asyncio
01h 23mPython async/await unraveled
