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. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/GW6ZKJD3DQJUWPA4VP2IO3XYVCDRIIVA/ Code of Conduct: http://python.org/psf/codeofconduct/