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 <>
> 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. 

Date User Action Args
2018-09-10 14:03:26mbussonnsetrecipients: + mbussonn, njs, yselivanov, willingc, minrk
2018-09-10 14:03:26mbussonnsetmessageid: <>
2018-09-10 14:03:26mbussonnlinkissue34616 messages
2018-09-10 14:03:26mbussonncreate