mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
add generic implementation of a __dict__ descriptor for C types
This commit is contained in:
parent
4a57846efe
commit
8eb1269c34
6 changed files with 64 additions and 19 deletions
|
@ -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*,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue