[issue15870] PyType_FromSpec should take metaclass as an argument
Petr Viktorin
report at bugs.python.org
Tue Oct 12 09:28:38 EDT 2021
Petr Viktorin <encukou at gmail.com> added the comment:
The new issue is bpo-45383.
There's a sprint newt week; I'll probably get to it then.
> But, I am trying to understand the preference for static better. There is probably something to learn or even important I am missing.
The original motivating use case is not "create types dynamically on demand", but "create types without details of the C structure being compiled into the extension". That is, make it possible for modules to be compatible with several versions of Python.
The spec is designed to be extensible; the type struct is designed to be fast at runtime.
> And I have some plans to make static specs useful in type checking
This is quickly getting out of scope here, but if you're interested, I put down some notes here: https://github.com/encukou/abi3/issues/19
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15870>
_______________________________________
More information about the Python-bugs-list
mailing list