[Python-Dev] PEP 492 vs. PEP 3152, new round (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Apr 25 07:02:25 CEST 2015


Victor Stinner wrote:

That's why I suggest to reconsider the idea of supporting an optional "from future import async" to get async and await as keywords in the current file. This import would allow all crazy syntax. The parser might suggest to use the import when it fails to parse an async or await keyword :-)

To me, these new features obviously should require a future import. Anything else would be crazy.

I accept the compromise of creating a coroutine object without wait for it (obvious and common bug when learning asyncio). Hopefully, we keep the coroutine wrapper feature (ok, maybe I suggested this idea to Yury because I suffered so much when I learnt how to use asyncio ;-)), so it will still be easy to emit a warning in debug mode.

I'm disappointed that there will still be no direct and reliable way to detect and clearly report this kind of error, and that what there is will only be active in a special debug mode.

-- Greg



More information about the Python-Dev mailing list