classification
Title: object.__dir__
Type: enhancement Stage: resolved
Components: Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, giampaolo.rodola, michael.foord, python-dev
Priority: normal Keywords:

Created on 2011-05-24 09:23 by michael.foord, last changed 2011-05-24 16:08 by python-dev. This issue is now closed.

Messages (2)
msg136726 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2011-05-24 09:23
Implementing a custom __dir__ method is fiddly because there is no way of obtaining the standard list of attributes that dir would return.

Moving the relevant parts of the dir implementation into object.__dir__ would allow a custom __dir__ to obtain the "standard list" by calling up to the base class.

See email discussion at:

http://mail.python.org/pipermail/python-ideas/2011-May/010319.html
msg136758 - (view) Author: Roundup Robot (python-dev) Date: 2011-05-24 16:08
New changeset 8f403199f999 by Benjamin Peterson in branch 'default':
move specialized dir implementations into __dir__ methods (closes #12166)
http://hg.python.org/cpython/rev/8f403199f999
History
Date User Action Args
2011-05-24 16:08:59python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg136758

resolution: fixed
stage: resolved
2011-05-24 10:53:55giampaolo.rodolasetnosy: + giampaolo.rodola
2011-05-24 09:23:50michael.foordcreate