From: Benjamin Peterson <benjamin@python.org> Date: Wed, 2 Jul 2008 14:44:54 +0000 (+0000) Subject: add an entry for object.__dir__ X-Git-Tag: v3.0b2~121 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1cef37cd0da16feeb3f059846084810291dcfcdb;p=python add an entry for object.__dir__ --- diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 5b220d0f4e..3d531c7dca 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