an oop question

Julieta Shem jshem at yaxenu.org
Wed Nov 2 20:53:33 EDT 2022


Alan Gauld <learn2program at gmail.com> writes:

> On 01/11/2022 17:58, Julieta Shem wrote:

[...]

>>> IS-A relationship, so Stack inheriting Pair would mean that a Stack
>>> was a Pair. That is not really true.
>> 
>> That's another interesting observation.  I do not have much
>> understanding of how to really think of these things
>
> Read up on the Liskoff substitution principle as one approach to
> determining what an IS-A relationship means. Its not the only
> approach but it is less vague than some others!

Thanks so much for the references.  I'll definitely look up the Liskov
substitution principle and try to understand it.  More on this soon.
Thanks also for the Meyer's reference too, the explanation of
``delegation'' and all your comments.  I appreciate it.


More information about the Python-list mailing list