]> granicus.if.org Git - python/commitdiff
add an entry for object.__dir__
authorBenjamin Peterson <benjamin@python.org>
Wed, 2 Jul 2008 14:44:54 +0000 (14:44 +0000)
committerBenjamin Peterson <benjamin@python.org>
Wed, 2 Jul 2008 14:44:54 +0000 (14:44 +0000)
Doc/reference/datamodel.rst

index 5b220d0f4e3d179a1f23a66499452993d43288ff..3d531c7dca219769200eda093a46d45b0d2bc3a2 100644 (file)
@@ -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