STINNER Victor <vstin...@python.org> added the comment:

> Doing so unnecessarily adds extra complexity (and, when multiple interpreters 
> are used, extra CPU usage and extra memory usage).

Right, PyConfig allocates memory per interpeter. But IMO it's an acceptable 
trade-off. I don't see the benefits of sharing the config between all 
interpreters.

Have per-interpreter config allows to create an interpreter with a different 
config:

* different sys.path
* isolated vs non-isolated
* dev mode
* etc.

While there is currently no easy way to use a custom config, recent changes 
make it easier to implement, like the function to modify a PyConfig from a 
Python dict: _PyInterpreterState_SetConfig().


> there is no public API for getting the config or changing it

Barry Warsaw proposed to add a function to get the config, but I didn't add it.

There are private functions for that:

* _testinternalcapi.get_config()
* _testinternalcapi.set_config()

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46964>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to