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/2002-July/026530.html below:

[Python-Dev] PEP 246 - Object Adaptation

[Python-Dev] PEP 246 - Object Adaptation [Python-Dev] PEP 246 - Object AdaptationGuido van Rossum guido@python.org
Mon, 15 Jul 2002 10:04:54 -0400
(Changing the subject)

> The big question is rather: given that Isub inherits from Isuper,
> does any object implementing Isub also implicitly implement Isuper?

This probably shows my naivete more than anything else...

I'd say "of course", based on an example where Isuper is
FileOpenForReading and Isub is FileOpenForReadingAndWriting.
It would be strange if a file open for reading and writing was not
acceptable in a place where a file open for reading is accepted
(because it implements all the right methods).  Or is the fact that it
implements *more* the problem?

Am I missing something?

I also thought that there's a different dimension of interface
inheritance: if class C implements interface I, and class D derives
from class C, does D implicitly implement I also?  Again, I'd say
yes.  But I believe Jim Fulton disagrees with me.  And again, I
haven't tried to use interfaces enough to understand what problems you
could get into by this assumption.

--Guido van Rossum (home page: http://www.python.org/~guido/)




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