> Do you mean that it's not possible to implement this at the syntax level 
> because we don't know until runtime if this is being call from a loop (async 
> calling sync code) ?

No. I'm saying you should clarify the semantics you want if you have
if your sync `test()` is called from within an async function and an
async eventloop that already have tasks.
 1) Do you allow switches to tasks that are "outside" of test, or
 2) Does your inner loop block all the outer loop tasks.
-- 
M


On Fri, 12 Jun 2020 at 14:51, J. Pic <j...@yourlabs.org> wrote:
>
> > I do think there is some case for non rentrency and nested loop where
> what you define here would block an outer loop, but most people
> suggesting what you ask actually want re-entrency, which is not
> possible there.
>
> Do you mean that it's not possible to implement this at the syntax level 
> because we don't know until runtime if this is being call from a loop (async 
> calling sync code) ?
>
> > Also Explicit is better than implicit.
>
> I'm not sure about the limits of this statement, I'm pretty happy to call 
> foo.bar instead of foo.__getattribute__('bar'), but I'm still grateful for 
> __getattribute__ that I can override. But of course, if there were two 
> competing __getattribute__ implementation then the language should force me 
> to choose one of them explicitly.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/NRTUU6PXKOJOBCH3VTOAJ6ECGIEBFZKY/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to