ian.g.kelly at gmail.com
Mon Nov 3 15:47:47 CET 2014
On Nov 2, 2014 5:31 AM, "Denis McMahon" <denismfmcmahon at gmail.com> wrote:
> And perhaps that also addresses the square - rectangle (or circle -
> ellipse) issue - square, rectangle and rhombus are all forms of
> quadrilateral, and perhaps should all inherit a base class Quadrilateral,
> rather than trying (and partially failing) to inherit each other.
No, it doesn't matter whether you have square inheriting from rectangle,
rhombus or quadrilateral. If the base class has mutator methods, you're
still going to have this problem when they allow the object to be mutated
in ways that violate the restrictions of the subclass.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list