[Python-Dev] PEP 567 v2
Yury Selivanov
yselivanov.ml at gmail.com
Wed Jan 3 00:13:33 EST 2018
I don't want to expose a SetContext operation because of, again, potential
incompatibility with PEP 550, where generators expect to fully control
push/pop context operation.
Second, Context.run is 100% enough for *any* async framework to add support
for PEP 567. And because the PEP is focused just on async, I think that we
don't need anything more than 'run'.
Third, I have a suspicion that we focus too much on actual Context and
Context.run. These APIs are meant for asyncio/twisted/trio/etc maintainers,
not for an average Python user. An average person will likely not interact
with any of the PEP 567 machinery directly, wven when using PEP 567-enabled
libraries like numpy/decimal.
Yury
On Wed, Jan 3, 2018 at 2:56 AM Victor Stinner <victor.stinner at gmail.com>
wrote:
> PEP:
> "int PyContext_Enter(PyContext *) and int PyContext_Exit(PyContext *)
> allow to set and restore the context for the current OS thread."
>
> What is the difference between Enter and Exit? Why not having a single
> Py_SetContext() function?
>
> Victor
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/yselivanov.ml%40gmail.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20180103/107b9f79/attachment.html>
More information about the Python-Dev
mailing list