When is a subclass not right?
Rick Zantow
rzantow at gmail.com
Thu Aug 24 19:04:17 EDT 2006
Gabriel Genellina <gagsl-py at yahoo.com.ar> wrote in
news:mailman.9831.1156458295.27775.python-list at python.org:
> At Thursday 24/8/2006 17:44, Chaz Ginger wrote:
>
>>That is merely a logical use of OO after all when would a car and an
>>orange be the same?
>
> Uh... what's the point...?
> By example, an orange inside a car would be modeled using
> composition, never inheritance.
I've heard of cars that seem to inherit from the *lemon* class, though. Not
a good object model, that.
--
rzed
More information about the Python-list
mailing list