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.
On Fri, 12 Jun 2020 at 14:51, J. Pic firstname.lastname@example.org
> > 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.