[Python-Dev] Consolidate stateful runtime globals
Glenn Linderman
v+python at g.nevcal.com
Wed Sep 6 16:30:29 EDT 2017
On 9/6/2017 1:18 PM, Gregory P. Smith wrote:
> I'm not concerned about moving things into a state structure rather
> than wildly scattered globals declared all over the place. It is good
> code hygiene. It ultimately moves us closer (much more work to be
> done) to being able to actually have multiple independent interpreters
> within the same process (including potentially even of different
> Python versions).
>
> For commonly typed things that get annoying,
>
> #define _Py_grail _PyRuntme.ceval.holy.grail
>
> within the .c source file that does a lot of grail flinging seems fine
> to me.
>
> -gps
You just need a PEP 550 (or 555) to use instead of C globals.
But why would you ever want multiple Python versions in one process?
Sounds like a debug headache in the making. Name collisions would abound
for libraries and functions even if globals were cured!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20170906/796beaab/attachment.html>
More information about the Python-Dev
mailing list