Simon Willison’s Weblog

Subscribe

Wednesday, 2nd September 2020

The “await me maybe” pattern for Python asyncio

I’ve identified a pattern for handling potentially-asynchronous callback functions in Python which I’m calling the “await me maybe” pattern. It works by letting you return a value, a callable function that returns a value OR an awaitable function that returns that value.

[... 787 words]

2020 » September

MTWTFSS
 123456
78910111213
14151617181920
21222324252627
282930