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/glossary.rst | |
parent | 5c174bbd845fb9da880b9ab1c9d5da0280cc880f (diff) | |
download | cpython-5e52db035d4fbce88c5a1a9820edca406fbf5f25.zip cpython-5e52db035d4fbce88c5a1a9820edca406fbf5f25.tar.gz cpython-5e52db035d4fbce88c5a1a9820edca406fbf5f25.tar.bz2 |
Add :term:s for descriptors.
Diffstat (limited to 'Doc/glossary.rst')
-rw-r--r-- | Doc/glossary.rst | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst index c92f6c2..88b1ccb 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -59,14 +59,16 @@ Glossary descriptor Any *new-style* object that defines the methods :meth:`__get__`, - :meth:`__set__`, or :meth:`__delete__`. When a class attribute is a + :meth:`__set__`, or :meth:`__delete__`. When a class attribute is a descriptor, its special binding behavior is triggered upon attribute - lookup. Normally, writing *a.b* looks up the object *b* in the class - dictionary for *a*, but if *b* is a descriptor, the defined method gets - called. Understanding descriptors is a key to a deep understanding of - Python because they are the basis for many features including functions, - methods, properties, class methods, static methods, and reference to super - classes. + lookup. Normally, using *a.b* to get, set or delete an attribute looks up + the object named *b* in the class dictionary for *a*, but if *b* is a + descriptor, the respective descriptor method gets called. Understanding + descriptors is a key to a deep understanding of Python because they are + the basis for many features including functions, methods, properties, + class methods, static methods, and reference to super classes. + + For more information about descriptors' methods, see :ref:`descriptors`. dictionary An associative array, where arbitrary keys are mapped to values. The use |