Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
FWIW, the relationship between a concrete class and an ABC is normative with respect to core capabilities but isn't 100% strict. Concrete classes can vary in small respects when it makes sense. For example, the __or__ and __and__ methods for collections.Set will accept any iterable, but the concrete does not. We use the Liskov substitution principle as a guide, not as a law. In a number of cases, we choose practicality-beats-purity and allow subclasses to differ in ways than their parents. Counter() doesn't support fromkeys(). OrderedDict.popitem() has different signature than dict.popitem(). Hope that insight was helpful. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41409> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com