A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-January/050867.html below:

[Python-Dev] PEP 246, redux

[Python-Dev] PEP 246, reduxAlex Martelli aleax at aleax.it
Tue Jan 11 21:10:00 CET 2005
On 2005 Jan 11, at 20:48, Phillip J. Eby wrote:
    ...
>> I'd rather not assume that class inheritance implies substitutability,
>
> Hm, you should take that up with Alex then, since that is what his 
> current PEP 246 draft does.  :)  Actually, the earlier drafts did that 
> too, so I'm not sure why you want to change this now.
>
> What I've actually suggested here actually allows for 
> inheritance=substitutability as the default, but also makes it 
> trivially changeable for any given inheritance hierarchy by overriding 
> __conform__ at the base of that hierarchy, and without introducing a 
> special exception class to do it.

The base of the hierarchy has no idea of which subclasses follow or 
break Liskov subtitutability.  It's just silly to site the check there. 
  Moreover, having to change the base class is more invasive than being 
able to do it in the derived class: typically the author of the derived 
class is taking the base class from some library and does not want to 
change that library -- changing the derived class is not ideal, but 
still way better.


Alex

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4