Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Bit of an unconstructice rant, but this always bothered me: Async is the nail in the coffin of The Zen of Python.[1]

Open a python REPL, type:

  >>> import this

There should be one—and preferably only one—obvious way to do it

It has not been true for years. Python 3 especially, took a sledgehammer to that ole poem.

See http://journal.stuffwithstuff.com/2015/02/01/what-color-is-y... which is about this effect. I am reminded of that blog post every single time I work with async in Python :/

[1] https://www.python.org/dev/peps/pep-0020/



Isn't Python 3 exactly a way to unify the async approaches? (not saying a good/bad way, just a way) We've had a few projects trying to do async in many ways over the years: stackless, gevent, twisted, asyncio, curio, ...

async in Python 3 goes from "there's lots of solutions, which should I choose?" to "there's an obvious solution in standard library (unless you really want something else for a very specific reason)"


The great thing and the awful thing about open source is that anyone can change what it means to be the "Zen of Python."

> There should be one—and preferably only one—obvious way to do it

I feel this can be interpreted many ways. Sure, async means there is more than one way you can do requests to get web data now, and more than one way you should structure your app - but not every app needs to do API calls async, and sometimes the complexity is not worth it.

Other times, yes, of course you need to do requests async. They're taking three minutes each and you have to do twenty of them.



There's also:

from __future__ import braces

and

import antigravity




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: