This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mbussonn
Recipients mbussonn, minrk, njs, willingc, yselivanov
Date 2018-09-10.14:03:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1536588206.41.0.56676864532.issue34616@psf.upfronthosting.co.za>
In-reply-to
Content
> I think the first thing is to add async "modes" to compile: in particular "async-exec" and "async-single". These would be like the current "exec" and "single" modes respectively, except that they act like the code is inside an "async def", so "await" is allowed, and executing the resulting code object produces a coroutine object that has to be iterated to actually run the code.

> This seems like a separate problem from the async stuff... I'm curious to hear how what distinction you want to make between 'exec' and a new 'multi-single' (?) mode, but maybe that should be a new issue?

Mell, in classical `exec` there is always a tension between "this is for a module" and "this is for REPL". We saw that close to 3.7 release where strings literal were moved into the AST Module `docstring` attribute.

In IPython[1] we also have to dance to trigger the display hook in a multi-line context by executing each top-level node one by one. So while we are designing a new `async-exec` while not tackle that issue at the same time and cover both use case ? That should let one category of user do the optimization they wish and get a `Module` object, without being slow down by the other. 

1: https://github.com/ipython/ipython/blob/869480ed70944ca70ad9ed70779b9c3e4320adb7/IPython/core/interactiveshell.py#L3179-L3190
History
Date User Action Args
2018-09-10 14:03:26mbussonnsetrecipients: + mbussonn, njs, yselivanov, willingc, minrk
2018-09-10 14:03:26mbussonnsetmessageid: <1536588206.41.0.56676864532.issue34616@psf.upfronthosting.co.za>
2018-09-10 14:03:26mbussonnlinkissue34616 messages
2018-09-10 14:03:26mbussonncreate