add generic implementation of a __dict__ descriptor for C types

This commit is contained in:
Benjamin Peterson 2012-02-19 19:59:10 -05:00
parent 4a57846efe
commit 8eb1269c34
6 changed files with 64 additions and 19 deletions

View file

@ -101,6 +101,18 @@ Object Protocol
This is the equivalent of the Python statement ``del o.attr_name``.
.. c:function:: PyObject* PyType_GenericGetDict(PyObject *o, void *context)
A generic implementation for the getter of a ``__dict__`` descriptor. It
creates the dictionary if necessary.
.. c:function:: int PyType_GenericSetDict(PyObject *o, void *context)
A generic implementation for the setter of a ``__dict__`` descriptor. This
implementation does not allow the dictionary to be deleted.
.. c:function:: PyObject* PyObject_RichCompare(PyObject *o1, PyObject *o2, int opid)
Compare the values of *o1* and *o2* using the operation specified by *opid*,

View file

@ -77,7 +77,6 @@ Type Objects
XXX: Document.
.. c:function:: int PyType_Ready(PyTypeObject *type)
Finalize a type object. This should be called on all type objects to finish