[Python-ideas] Revisiting Immutable Mappings

Jonathan Fine jfine2358 at gmail.com
Thu Oct 11 09:15:16 EDT 2018


> https://en.wikipedia.org/wiki/Liskov_substitution_principle
> https://en.wikipedia.org/wiki/Don%27t_repeat_yourself

I did an internet search for: python liskov (over the past year).

The first result was a Ruby page (but principle probably the same)
https://www.netguru.co/codestories/solid-principles-3-lsp

The second result was "Incompatibile signature with supertype"
https://github.com/python/mypy/issues/4250

And the code example was

    class FrozenDict(MutableMapping):
         # code

So there's prior Python art for FrozenDict and Liskov inheritance.

-- 
Jonathan


More information about the Python-ideas mailing list