summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-06-11 21:12:08 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-06-11 21:12:08 (GMT)
commit3bbb72265411585e64a5d2ccb5ba51763f20e311 (patch)
tree8ec38156f5e1b1851dcc8f0490e941bb56435427 /Doc/reference
parent703f7c4bf5fa98f9b8b11593d3fa37eb68eae896 (diff)
downloadcpython-3bbb72265411585e64a5d2ccb5ba51763f20e311.zip
cpython-3bbb72265411585e64a5d2ccb5ba51763f20e311.tar.gz
cpython-3bbb72265411585e64a5d2ccb5ba51763f20e311.tar.bz2
allow __dir__ to return any sequence
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/datamodel.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 129f987..e628a02 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1343,7 +1343,8 @@ access (use of, assignment to, or deletion of ``x.name``) for class instances.
.. method:: object.__dir__(self)
- Called when :func:`dir` is called on the object. A list must be returned.
+ Called when :func:`dir` is called on the object. A sequence must be
+ returned. :func:`dir` converts the returned sequence to a list and sorts it.
.. _descriptors: