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

Reply via email to