From 1cef37cd0da16feeb3f059846084810291dcfcdb Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 2 Jul 2008 14:44:54 +0000 Subject: [PATCH] add an entry for object.__dir__ --- Doc/reference/datamodel.rst | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.40.0