Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
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 isinstance() do not work the same way. type() does not inspect the `__class__` attribute. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32683> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com