On Tue, Oct 1, 2019 at 8:48 AM Ben Rudiak-Gould <[email protected] <mailto:[email protected]>> wrote:

    Is it? Subtyping in type theory satisfies some axioms, one of which is
    transitivity. The addition of the ABCs broke transitivity:

        >>> issubclass(list, object)
        True
        >>> issubclass(object, collections.abc.Hashable)
        True
        >>> issubclass(list, collections.abc.Hashable)
        False

This isn't really the fault of ABCs, it's a consequence of the fact
that subclasses can nobble certain methods by setting them to None.
The non-transitivity was already there, it's just that issubclass()
doesn't always detect it.

--
Greg
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/EQPDWDKVYVHWLZYV2KPEB3YUTXUOUBIB/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to