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 Gabriele Tornetta
Recipients Gabriele Tornetta, bup, r.david.murray, steven.daprano
Date 2021-12-09.15:02:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1639062157.18.0.257697415684.issue32683@roundup.psfhosted.org>
In-reply-to
Content
I think the issue on display here is that isinstance could cause a side effect, which I dare say it's unexpected (and not documented AFAIK). Are there any reasons why __class__ cannot be retrieved with object.__getattribute__ instead? In fact, considering that __getattribute__ could be overridden, this would be the right thing to do imho, else isinstance would break spectacularly, like in my previous example.
History
Date User Action Args
2021-12-09 15:02:37Gabriele Tornettasetrecipients: + Gabriele Tornetta, steven.daprano, r.david.murray, bup
2021-12-09 15:02:37Gabriele Tornettasetmessageid: <1639062157.18.0.257697415684.issue32683@roundup.psfhosted.org>
2021-12-09 15:02:37Gabriele Tornettalinkissue32683 messages
2021-12-09 15:02:37Gabriele Tornettacreate