mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
add an entry for object.__dir__
This commit is contained in:
parent
549845b5f5
commit
1cef37cd0d
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue