You forgot something in that example I think because it doesn't actually do anything that can "not work".
On 31 Dec 2019, at 18:41, Soni L. <fakedme+py@gmail.com> wrote:
I would like this code to work, but currently python ignores __subclasscheck__ in many places where it checks for subclasses:
class MM(type): def __subclasscheck__(self, subclass): return issubclass(subclass, type)
class M(type, metaclass=MM): pass
class N(type): pass
class C(metaclass=M): pass
class D(metaclass=N): pass
class E(C, D, metaclass=N): pass
def main(): e = E()
main() _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/4F6IQD... Code of Conduct: http://python.org/psf/codeofconduct/