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 bup, r.david.murray, steven.daprano
Date 2018-01-27.00:00:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1517011205.23.0.467229070634.issue32683@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2018-01-27 00:00:05steven.dapranosetrecipients: + steven.daprano, r.david.murray, bup
2018-01-27 00:00:05steven.dapranosetmessageid: <1517011205.23.0.467229070634.issue32683@psf.upfronthosting.co.za>
2018-01-27 00:00:05steven.dapranolinkissue32683 messages
2018-01-27 00:00:05steven.dapranocreate