diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-02-20 00:59:10 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-02-20 00:59:10 (GMT) |
commit | 8eb1269c346fa860acce9459c0bed065ffccd3ce (patch) | |
tree | 186cdf221973397a4968a4c16d78d3298ff2011b /Doc | |
parent | 4a57846efe1419843a5e1a35a9f098bab6b066c9 (diff) | |
download | cpython-8eb1269c346fa860acce9459c0bed065ffccd3ce.zip cpython-8eb1269c346fa860acce9459c0bed065ffccd3ce.tar.gz cpython-8eb1269c346fa860acce9459c0bed065ffccd3ce.tar.bz2 |
add generic implementation of a __dict__ descriptor for C types
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/c-api/object.rst | 12 | ||||
-rw-r--r-- | Doc/c-api/type.rst | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index 88ba5ac..43768f3 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -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*, diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst index b3386ea..f8e01c0 100644 --- a/Doc/c-api/type.rst +++ b/Doc/c-api/type.rst @@ -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 |