Maximum Recursion Depth Error With Getattr March 31, 2024 Post a Comment I have this code; class NumberDescriptor(object): def __get__(self, instance, owner): name = (hasattr(self, 'name') and self.name) if not name: nameSolution 1: The getattr() call is calling your __get__.One way to work around this is to explicitly call through the superclass, object:object.__getattribute__(instance, name) CopyOr, clearer:instance.__dict__[name]Copy Share Post a Comment for "Maximum Recursion Depth Error With Getattr"
Post a Comment for "Maximum Recursion Depth Error With Getattr"