[issue15870] PyType_FromSpec should take metaclass as an argument

Alexander Belopolsky report at bugs.python.org
Thu Sep 6 19:04:58 CEST 2012


Alexander Belopolsky added the comment:

On Thu, Sep 6, 2012 at 12:44 PM, Amaury Forgeot d'Arc
<report at bugs.python.org> wrote:
> The patch is a bit light: see how type_new also computes the metaclass from the base classes.

This was intentional.  I was looking for a lightweight facility to
create heap types.  I know metaclass when I call PyType_FromSpec.  If
i wanted to invoke the "metaclass from the base classes" logic, I
would just specify an appropriate base class in the spec.  This would
still leave an open problem of specifying the metatype for the most
basic class.   This is the problem I am trying to solve.

----------
nosy: +Alexander.Belopolsky

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


More information about the Python-bugs-list mailing list