
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2019-03-25 23:49 bygvanrossum, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.
| Messages (4) | |||
|---|---|---|---|
| msg338840 -(view) | Author: Guido van Rossum (gvanrossum)*![]() | Date: 2019-03-25 23:49 | |
I just found out about IPython's autoawait feature:https://ipython.readthedocs.io/en/stable/interactive/autoawait.htmlI wonder if we should at least help them do this right in Python 3.8 by having a flag to compile() that allows `await` in the toplevel syntax? It looks like a relatively small change would suffice to make compiler_visit_expr1() inPython/compile.c accept (and generate correct code for) Await_kind outside async functions, if some flag is set. | |||
| msg338841 -(view) | Author: Yury Selivanov (yselivanov)*![]() | Date: 2019-03-25 23:50 | |
Absolutely. I think there's another open issue for this and I even have a dev branch somewhere with this idea half implemented. Definitely something to have in 3.8. | |||
| msg338842 -(view) | Author: Karthikeyan Singaravelan (xtreak)*![]() | Date: 2019-03-26 00:03 | |
I think this is same asissue34616 . The issue talks about the workarounds IPython has to use for the feature and links to the PR where it was implementedhttps://github.com/ipython/ipython/pull/11265 . I never knew about this feature and this will be very helpful to have especially it reduces boilerplate in having async functions for await calls though asyncio.run improved setting up loop part. Helps in playing around with API in repl during learning with top level await expressions allowed in repl. | |||
| msg338843 -(view) | Author: Guido van Rossum (gvanrossum)*![]() | Date: 2019-03-26 00:05 | |
Oh, you're right. Thanks! Closing in favor ofissue34616. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:13 | admin | set | github: 80609 |
| 2019-03-26 00:09:01 | xtreak | set | superseder:implement "Async exec" |
| 2019-03-26 00:05:56 | gvanrossum | set | status: open -> closed resolution: duplicate messages: +msg338843 stage: resolved |
| 2019-03-26 00:03:32 | xtreak | set | nosy: +xtreak messages: +msg338842 |
| 2019-03-25 23:50:59 | yselivanov | set | messages: +msg338841 |
| 2019-03-25 23:49:29 | gvanrossum | create | |