Antti Haapala added the comment:

Could it be possible to to make the debug build absolutely abort on any usage 
of PyType's that are not readied, usage including instantiating them. Then, 
instead of changing all `static` linkages to `extern`s (as in Serhiy's first 
patch) one could rather make per-compilation unit initialization functions that 
are called from objects.c; that way it would be easier to use preprocessor to 
turn on and off the very existence of certain types in a compilation unit based 
on a preprocessor flag.

Likewise the C-API docs for PyType_Ready should perhaps say "This must be 
called on all type objects to finish their initialization." instead of "should"

----------

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

Reply via email to