INADA Naoki <songofaca...@gmail.com> added the comment:

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.

----------

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

Reply via email to