[issue40098] dir() does not return the list of valid attributes for the object
Guido van Rossum
report at bugs.python.org
Tue Mar 31 17:33:43 EDT 2020
Guido van Rossum <guido at python.org> added the comment:
At least for overriding __dict__, I would presume there would be a matching override for __getattribute__ (not __getattr__).
Ditto for __class__, e.g. look at GenericAlias in the pep585 implementation PR. (Here __class__ is not in the list of exceptions so it returns the attribute from list.)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40098>
_______________________________________
More information about the Python-bugs-list
mailing list