diff options
| author | Benjamin Peterson <benjamin@python.org> | 2011-06-11 16:12:08 -0500 |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2011-06-11 16:12:08 -0500 |
| commit | 3bbb72265411585e64a5d2ccb5ba51763f20e311 (patch) | |
| tree | 8ec38156f5e1b1851dcc8f0490e941bb56435427 /Doc/reference | |
| parent | 703f7c4bf5fa98f9b8b11593d3fa37eb68eae896 (diff) | |
| download | cpython-git-3bbb72265411585e64a5d2ccb5ba51763f20e311.tar.gz | |
allow __dir__ to return any sequence
Diffstat (limited to 'Doc/reference')
| -rw-r--r-- | Doc/reference/datamodel.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 129f987a44..e628a02876 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: |
