22 ms·
> but eventually I found those pretty verbose as well... It is definitely a bit verbose, but I decided that the clarity for the rest of the code is worth putti
by jonesetc 11y ago
> but eventually I found those pretty verbose as well...
It is definitely a bit verbose, but I decided that the clarity for the rest of the code is worth putting a yield before each function call. Also I've found a few projects (for Tornado at least) that cut down on this boiler plate and make the yield only required at the lowest level where the async really happens. [0]
> The worst thing was having to hunt for Twisted version of libraries. "Oh you want to talk XMPP? Nah, can't use this Python library, have to find the Twisted version of it". It basically split the library ecosystem. Now presumably it will be having to look for async/await version of libraries that do IO.
I work with Tornado and this is absolutely the worst part. At least with Tornado the newest version is embracing interoperability with python 3.4+ native AsynIO.
[0] https://github.com/virtuald/greenado https://github.com/virtuald/greenado