[Python-checkins] cpython (3.2): note mutating tp_dict is bad (closes #12719)
benjamin.peterson
python-checkins at python.org
Tue Aug 9 23:17:23 CEST 2011
http://hg.python.org/cpython/rev/6ef65516fd7a
changeset: 71791:6ef65516fd7a
branch: 3.2
parent: 71786:7ea5d9c858f1
user: Benjamin Peterson <benjamin at python.org>
date: Tue Aug 09 16:07:01 2011 -0500
summary:
note mutating tp_dict is bad (closes #12719)
files:
Doc/c-api/typeobj.rst | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst
--- a/Doc/c-api/typeobj.rst
+++ b/Doc/c-api/typeobj.rst
@@ -745,6 +745,11 @@
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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list