This proposal might be of interest to folks here: https://discuss.python.org/t/preventing-yield-inside-certain-context-managers/1091
I posted the main text there instead of here because it's a change to the core interpreter, but the motivation is async APIs. Probably best to post replies there, to keep the discussion consolidated. -n -- Nathaniel J. Smith -- https://vorpus.org _______________________________________________ Async-sig mailing list Async-sig@python.org https://mail.python.org/mailman/listinfo/async-sig Code of Conduct: https://www.python.org/psf/codeofconduct/