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...@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-le...@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/4F6IQD5QIMDZ6BNVB7EZQ2HYKQ3KLZB3/ > Code of Conduct: http://python.org/psf/codeofconduct/ _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@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/LHJLSF3SBC6Z634FN4GRP3PBC7XIH7C5/ Code of Conduct: http://python.org/psf/codeofconduct/