[Python-Dev] cpython: add generic implementation of a dict descriptor for C types (original) (raw)
Georg Brandl g.brandl at gmx.net
Mon Feb 20 08:45:14 CET 2012
- Previous message: [Python-Dev] [Python-checkins] cpython: Issue #14043: Speed up importlib's _FileFinder by at least 8x, and add a new
- Next message: [Python-Dev] Python in Native Client
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Am 20.02.2012 02:04, schrieb benjamin.peterson:
http://hg.python.org/cpython/rev/78f93eb7dd75 changeset: 75050:78f93eb7dd75 user: Benjamin Peterson <benjamin at python.org> date: Sun Feb 19 19:59:10 2012 -0500 summary: add generic implementation of a dict descriptor for C types
files: Doc/c-api/object.rst | 12 +++++++++ Doc/c-api/type.rst | 1 - Include/object.h | 2 + Misc/NEWS | 4 +++ Objects/object.c | 42 ++++++++++++++++++++++++++++++++ Objects/typeobject.c | 22 +++------------- 6 files changed, 64 insertions(+), 19 deletions(-)
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -101,6 +101,18 @@ This is the equivalent of the Python statement
del o.attrname
. +.. c:function:: PyObject* PyTypeGenericGetDict(PyObject *o, void *context) + + A generic implementation for the getter of a_dict_
descriptor. It + creates the dictionary if necessary. + + +.. c:function:: int PyTypeGenericSetDict(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* PyObjectRichCompare(PyObject *o1, PyObject *o2, int opid)
versionadded, please?
Georg
- Previous message: [Python-Dev] [Python-checkins] cpython: Issue #14043: Speed up importlib's _FileFinder by at least 8x, and add a new
- Next message: [Python-Dev] Python in Native Client
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]