[issue15870] PyType_FromSpec should take metaclass as an argument

Petr Viktorin report at bugs.python.org
Thu Sep 23 15:43:09 EDT 2021


Petr Viktorin <encukou at gmail.com> added the comment:

- specs/slots are (usually) constant & static; pointers to types are not always C constant expressions (on Windows, if they come from a different DLL)
- specs/slots are (usually) shared across all subinterpreters; types are specific to a single interpreter

It's better to pass the metaclass as a function argument, as with bases. I'd prefer adding a new function that using a slot.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15870>
_______________________________________


More information about the Python-bugs-list mailing list