Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:

Dan, I don't understand what you think the code snippet shows: you're calling 
isclass on an object which *actually is a class* and show that it returns True. 
What did you expect it to return? How does the code snippet you give 
demonstrate a problem?

You say:

"isinstance is calling ob.__getattribute__ as a fallback instead of 
object.__class__.__get__"

but why do you think that is wrong, and what makes you think that 
object.__class__.__get__ is the right way to do it? You seem to think it is 
self-evident, but it isn't (at least not to me).

"It doesn't even care if the result it gets from 
ob.__getattribute__("__class__") isn't a type."

Should it care?

----------
nosy: +steven.daprano

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32683>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to