Uh, never mind, I'm actually doing this: // Don't call the type directly to do the construction, since // that would require the registration of an appropriate // __init__ function. PyObject* raw_result = m_class_object->tp_alloc(m_class_object, 0); ----- Original Message ----- From: "Guido van Rossum" <guido@python.org> To: "David Abrahams" <david.abrahams@rcn.com> Cc: "Thomas Heller" <thomas.heller@ion-tof.com>; <python-dev@python.org> Sent: Tuesday, April 09, 2002 5:54 PM Subject: Re: [Python-Dev] New type objects and PyObject_New > [Thomas Heller] > > > It seems possible to create new type objects still with > > > PyObject_New() instead of calling the type object. > > > Is this a bug? > > [David Abrahams] > > 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/) >
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4