summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-07-02 14:44:54 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-07-02 14:44:54 (GMT)
commit1cef37cd0da16feeb3f059846084810291dcfcdb (patch)
tree4a681d9abb1fa28f18f70a3f4dfe991a125b07f2 /Doc/reference
parent549845b5f552d3c30f74e55069c47125cb135e86 (diff)
downloadcpython-1cef37cd0da16feeb3f059846084810291dcfcdb.zip
cpython-1cef37cd0da16feeb3f059846084810291dcfcdb.tar.gz
cpython-1cef37cd0da16feeb3f059846084810291dcfcdb.tar.bz2
add an entry for object.__dir__
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/datamodel.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 5b220d0..3d531c7 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1314,6 +1314,11 @@ access (use of, assignment to, or deletion of ``x.name``) for class instances.
should only be implemented if ``del obj.name`` is meaningful for the object.
+.. method:: object.__dir__(self)
+
+ Called when :func:`dir` is called on the object. A list must be returned.
+
+
.. _descriptors:
Implementing Descriptors