Nick Coghlan added the comment:

Looking at the potential impact of being able to use C99 initializers for the 
main configuration structs, I realised those could be a *lot* easier to work 
with if they consisted entirely of pointers to Python objects:

* NULL initialisation would correctly indicate "not set" for each value
* Running Py_XDECREF on every field will correctly release memory
* Boolean toggles are clearly separated from multi-value integers (PyBool vs 
PyLong)
* No conversion is needed to provide a read-only view of the config data at the 
Python level

This wouldn't be feasible for CoreConfig (since that is populated before Python 
object creation is permitted), but should work for MainInterpreterConfig and 
InterpreterConfig.

----------

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

Reply via email to