note mutating tp_dict is bad (closes #12719)

This commit is contained in:
Benjamin Peterson 2011-08-09 16:07:01 -05:00
parent da3f4ae34b
commit 77c4fd01dd
1 changed files with 5 additions and 0 deletions

View File

@ -745,6 +745,11 @@ type objects) *must* have the :attr:`ob_size` field.
This field is not inherited by subtypes (though the attributes defined in here
are inherited through a different mechanism).
.. warning::
It is not safe to use :c:func:`PyDict_SetItem` on or otherwise modify
:attr:`tp_dict` with the dictionary C-API.
.. c:member:: descrgetfunc PyTypeObject.tp_descr_get