This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author michael.foord
Recipients benjamin.peterson, gvanrossum, michael.foord, ncoghlan, pitrou
Date 2010-09-01.15:06:02
SpamBayes Score 7.1346956e-05
Marked as misclassified No
Message-id <1283353564.01.0.130344241302.issue9732@psf.upfronthosting.co.za>
In-reply-to
Content
Since the addition of __dir__, dir(obj) can return arbitrary values. Typically (I guess) this will be used to add dynamically created attributes that this function will fail to find - so it is *more* likely that we will fail to find something in dir than the reverse.

__dir__ could also be  used to filter non-public members that getattr(...) would find. I would find it odd that getattr finds a member that exists but this function fails. I think this function is more akin to getattr than dir.

Perhaps a better warning would be that this function may fail to find members that getattr finds?
History
Date User Action Args
2010-09-01 15:06:04michael.foordsetrecipients: + michael.foord, gvanrossum, ncoghlan, pitrou, benjamin.peterson
2010-09-01 15:06:04michael.foordsetmessageid: <1283353564.01.0.130344241302.issue9732@psf.upfronthosting.co.za>
2010-09-01 15:06:02michael.foordlinkissue9732 messages
2010-09-01 15:06:02michael.foordcreate