Some answers from this question bring very silly ways to cripple the ability to access methods and attributes for instances of objects overriding __dir__
and __getattribute__
.
The attributes and methods are still there, but are they really inaccessible?
For example, type(x)
still returns the correct answer even if x.__class__
raises AttributeError.
Is there any way to access the hidden methods and attributes?