Skip to content

Commit 40b20f1

Browse files
authored
perf: disallow __dunder__ attributes on Deferred (#10888)
1 parent 913fa51 commit 40b20f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ibis/common/deferred.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ def __repr__(self):
9494
return repr(self._resolver) if self._repr is None else self._repr
9595

9696
def __getattr__(self, name):
97+
if name.startswith("__") and name.endswith("__"):
98+
raise AttributeError(name)
9799
return Deferred(Attr(self, name))
98100

99101
def __iter__(self):

0 commit comments

Comments
 (0)