Such a tutorial would be fine as a HOWTO (in https://docs.python.org/3/howto/index.html) but IMO not in the stdlib docs for asyncio itself (there could be a pointer to the HOWTO doc of course). Then again the stdlib docs don't need to be a tutorial.
Skimming Armin's blog it seems one problem is that he treats all concepts equally. E.g. you don't really need to know about policies to get started, nor about the details of how event loops are bound to threads, nor about how to deal with multiple event loops at all, or how to survive if the event loop is not bound to a thread. (Maybe he read asyncio's own code to try to learn how to use it? or aiohttp's?) All those concepts thrown together without focus indeed make for a confusing initial experience. Several of the things that Yury mentions (how to safely close an event loop) also don't belong in a tutorial. Honestly I'd just call os._exit(0) when you are ready to exit, to avoid all the silly cleanup-related errors that are trying to warn you against advanced mistakes. On Sun, Oct 30, 2016 at 3:00 PM, Donald Stufft <don...@stufft.io> wrote: > > On Oct 30, 2016, at 5:36 PM, Guido van Rossum <gu...@python.org> wrote: > > But if you want HTTP, you really should use aiohttp, not some crappy > version that we might supply in the stdlib. There's nothing > dishonorable about using a 3rd party package! > > > > Maybe it would make sense to use aiohttp or something to explain the > concepts of AsyncIO instead of restricting it to just what’s in the standard > library? We have pip shipped w/ Python now and the venv module exists, so > for most people installing aiohttp into a virtual environment or something > to play with asyncio shouldn’t be a big deal. > > To be clear, I don’t mean try to extensively document aiohttp, but rather > use it as a real-ish world introduction to asyncio for folks. > > — > Donald Stufft > > > -- --Guido van Rossum (python.org/~guido)