who is calling the base class __new__ method

Andreas Otto aotto1968 at onlinehome.de
Tue Apr 21 13:31:16 CEST 2009



Hi,

  found a solution ....

  - "PyObject_GC_New" seems not to be *not* the right function to
        create a new Python object with a base class included

  - "PyType_GenericNew" is the right one ...
        but this one is not documented ....

from: http://docs.python.org/3.0/c-api/type.html
=================================================
PyObject* PyType_GenericNew(PyTypeObject *type, PyObject *args, PyObject
*kwds)¶
    Return value: New reference.

    XXX: Document.
=================================================

   Question: What is the difference between these both functions
        and why is one working and the other not ?
        



More information about the Python-list mailing list