[Python-Dev] Re: Should isinstance call __getattribute__?

2021-12-10 Thread Ronald Oussoren via Python-Dev
> On 10 Dec 2021, at 14:40, Steven D'Aprano wrote: > > On Thu, Dec 09, 2021 at 05:19:00PM +0100, Ronald Oussoren wrote: > >> https://mail.python.org/pipermail/python-dev/2015-October/141953.html >> is an old thread about the difference between type(x)/Py_TYPE(x) and >> x.__class__ that

[Python-Dev] Re: Should isinstance call __getattribute__?

2021-12-10 Thread Steven D'Aprano
On Thu, Dec 09, 2021 at 05:19:00PM +0100, Ronald Oussoren wrote: > https://mail.python.org/pipermail/python-dev/2015-October/141953.html > is an old thread about the difference between type(x)/Py_TYPE(x) and > x.__class__ that contains some insight about this. Thanks for the link Ronald, I

[Python-Dev] Re: Should isinstance call __getattribute__?

2021-12-09 Thread Ronald Oussoren via Python-Dev
> On 9 Dec 2021, at 16:41, Steven D'Aprano wrote: > > I'm looking for some guidance on a bug report involving isinstance and > __getattribute__` please. > > The issue is that if your class overloads `__getattribute__`, calling > isinstance on an instance will call the overloaded