Yes, it's supposed to work. There's tons of special code to support it, and
documentation (e.g.
https://docs.python.org/3/reference/datamodel.html?highlight=__mro_entries__#resolving-mro-entries
).

Now, I think it was an attempt at getting too fancy, but we can't remove
the functionality without deprecation etc. -- __mro_entries__ was
introduced in Python 3.7 by PEP 560 to support it (but the support itself
is much older).

On Sat, Mar 5, 2022 at 9:50 AM Steven D'Aprano <st...@pearwood.info> wrote:

> On Sat, Mar 05, 2022 at 04:42:55PM -0000, Jason Madden wrote:
>
> > zope.interface relies on this behaviour.
>
> The example you give shows that Interface is a class. It merely has a
> metaclass which is not `type`. (I presume that is what's going on
> behind the scenes.)
>
> I'm asking about the example that Serhiy shows, where a class inherits
> from something which is not a class at all. In his example, the base is
> 1, although it gives a TypeError. I'm asking if that sort of thing is
> suppposed to work, and if so, how?
>
>
> --
> Steve
> _______________________________________________
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/E2IWXPFY32R6JS22XXFORMNQTI4S6AOK/
> Code of Conduct: http://python.org/psf/codeofconduct/
>


-- 
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/JWT2KD3QPMDWNDQZFUPFJXKA6S6BZXLX/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to