We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1db0436 commit 590507bCopy full SHA for 590507b
bpython/inspection.py
@@ -104,13 +104,13 @@ def __enter__(self) -> None:
104
if __getattr__ is not None:
105
try:
106
setattr(type_, "__getattr__", (lambda *_, **__: None))
107
- except TypeError:
+ except (TypeError, AttributeError):
108
__getattr__ = None
109
__getattribute__ = getattr(type_, "__getattribute__", None)
110
if __getattribute__ is not None:
111
112
setattr(type_, "__getattribute__", object.__getattribute__)
113
114
# XXX: This happens for e.g. built-in types
115
__getattribute__ = None
116
self._attribs = (__getattribute__, __getattr__)
0 commit comments