This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients Akuli, Jim.Jewett, ShubhamKJha, Yuan, pablogsal, rhettinger, serhiy.storchaka
Date 2020-07-28.05:14:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1595913284.59.0.584861303055.issue41409@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-07-28 05:14:44rhettingersetrecipients: + rhettinger, Jim.Jewett, serhiy.storchaka, Akuli, pablogsal, ShubhamKJha, Yuan
2020-07-28 05:14:44rhettingersetmessageid: <1595913284.59.0.584861303055.issue41409@roundup.psfhosted.org>
2020-07-28 05:14:44rhettingerlinkissue41409 messages
2020-07-28 05:14:44rhettingercreate