Neil Girdhar added the comment: @gvanrossum is there any reason that subclasshook is implemented by overriding instead of cooperation? E.g.,:
class Sized(metaclass=ABCMeta): @classmethod def __subclasshook__(cls, C): return (super().__subclasshook__(C) and any("__len__" in B.__dict__ for B in C.__mro__)) etc. And then Collection does not need to implement subclasshook since its base classes cooperate? ---------- nosy: +neil.g _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27598> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com