This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients Gabriele Tornetta, bup, ethan.furman, paul.moore, r.david.murray, rhettinger, steven.daprano
Date 2021-12-10.02:36:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20211210023339.GW21647@ando.pearwood.info>
In-reply-to <1639094595.1.0.361239052716.issue32683@roundup.psfhosted.org>
Content
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.
History
Date User Action Args
2021-12-10 02:36:15steven.dapranosetrecipients: + steven.daprano, rhettinger, paul.moore, r.david.murray, ethan.furman, bup, Gabriele Tornetta
2021-12-10 02:36:15steven.dapranolinkissue32683 messages
2021-12-10 02:36:15steven.dapranocreate