diff options
author | Georg Brandl <georg@python.org> | 2007-10-21 10:45:46 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-10-21 10:45:46 (GMT) |
commit | 5e52db035d4fbce88c5a1a9820edca406fbf5f25 (patch) | |
tree | 5051f2fe632a3b3573a545835ca3f1b00b142927 /Doc/extending | |
parent | 5c174bbd845fb9da880b9ab1c9d5da0280cc880f (diff) | |
download | cpython-5e52db035d4fbce88c5a1a9820edca406fbf5f25.zip cpython-5e52db035d4fbce88c5a1a9820edca406fbf5f25.tar.gz cpython-5e52db035d4fbce88c5a1a9820edca406fbf5f25.tar.bz2 |
Add :term:s for descriptors.
Diffstat (limited to 'Doc/extending')
-rw-r--r-- | Doc/extending/newtypes.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/extending/newtypes.rst b/Doc/extending/newtypes.rst index 2a53579..e4d4e32 100644 --- a/Doc/extending/newtypes.rst +++ b/Doc/extending/newtypes.rst @@ -1149,7 +1149,7 @@ Note that this list does not place any restrictions on the values of the attributes, when the values are computed, or how relevant data is stored. When :cfunc:`PyType_Ready` is called, it uses three tables referenced by the -type object to create *descriptors* which are placed in the dictionary of the +type object to create :term:`descriptor`\s which are placed in the dictionary of the type object. Each descriptor controls access to one attribute of the instance object. Each of the tables is optional; if all three are *NULL*, instances of the type will only have attributes that are inherited from their base type, and @@ -1193,7 +1193,7 @@ be read-only or read-write. The structures in the table are defined as:: char *doc; } PyMemberDef; -For each entry in the table, a descriptor will be constructed and added to the +For each entry in the table, a :term:`descriptor` will be constructed and added to the type which will be able to extract a value from the instance structure. The :attr:`type` field should contain one of the type codes defined in the :file:`structmember.h` header; the value will be used to determine how to |