[Python-Dev] New type objects and PyObject_New
Guido van Rossum
Tue, 09 Apr 2002 18:54:54 -0400
> > It seems possible to create new type objects still with
> > PyObject_New() instead of calling the type object.
> > Is this a bug?
> I sure hope not! I need that functionality!
Um, PyObject_New() is the low-level allocation function that you
should be calling from the type's tp_new, not something you should be
calling elsewhere to create an instance of a type.
--Guido van Rossum (home page: http://www.python.org/~guido/)