Re: [issue32683] isinstance is calling ob.__getattribute__ as a fallback instead of object.__class__.__get__
10 Dec
2021
10 Dec
'21
1:53 a.m.
On Fri, Dec 10, 2021 at 12:03:15AM +0000, Gabriele N Tornetta wrote:
class Side(object): def __getattribute__(self, name): ValueError(name)
You forgot to actually *raise* the exception. That will just instantiate the ValueError instance, and then immediately garbage collect it. In any case, type() and isinsance() do not work the same way. type() does not inspect the `__class__` attribute.
1064
Age (days ago)
1064
Last active (days ago)
0 comments
1 participants
participants (1)
-
Steven D'Aprano