On Fri, Oct 12, 2018 at 2:41 AM Chris Barker - NOAA Federal via Python-ideas <python-ideas@python.org> wrote: > > > This violates the Liskov Substitution Principle. > > If we REALLY had a time machine, then dict would subclass frozendict, > and we’d be all set.
Thanks to virtual subclassing, we can still do this. The question is, should we? Intuition tells me that a frozen dictionary is a form of dictionary that adds restrictions, not that a dictionary is a frozen dictionary that you left out to thaw. But as we see from [frozen]set, it's probably best to treat them as completely independent classes, both implementing the basic Mapping interface. ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/