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 methane
Recipients izbyshev, jab, methane, serhiy.storchaka
Date 2018-03-07.08:59:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1520413155.74.0.467229070634.issue33018@psf.upfronthosting.co.za>
In-reply-to
Content
Why `issubclass()` doesn't check it?  Maybe, non-type class is supported by Python.  But I'm not sure.  I'm not meta programming expert.

But we use "duck typing".  In this case, if the object (a) supports weakref and (2) has __mro__ and it is tuple, we treat the object as a class.

And when raising TypeError, information about which assumption was broken may be useful.

So I'm -1 on adding such strong check or removing internal information without meta programming expert advice.
History
Date User Action Args
2018-03-07 08:59:15methanesetrecipients: + methane, jab, serhiy.storchaka, izbyshev
2018-03-07 08:59:15methanesetmessageid: <1520413155.74.0.467229070634.issue33018@psf.upfronthosting.co.za>
2018-03-07 08:59:15methanelinkissue33018 messages
2018-03-07 08:59:15methanecreate