New subclass vs option in __init__

Neil Cerutti horpner at yahoo.com
Fri Dec 7 09:36:07 EST 2007


On 2007-12-07, Carl Banks <pavlovevidence at gmail.com> wrote:
> On Dec 6, 11:56 am, "Kurt Smith" <kwmsm... at gmail.com> wrote:
>> It would seem that there are cases where one would be
>> preferable over the other: a) when the new behavior would
>> modify a large portion of the existing subclass, making a new
>> subclass would be ideal; b) when the new behavior changes only
>> slightly the existing subclass, perhaps a simple default
>> option in the subclass's __init__ method would be best.  Where
>> is the tipping point?
>
> Good question.

The major factor in the tipping point is clarity. And simplicity.
The two major factors in deciding the tipping point are: clarity,
simplicity, and extensibility. ... The THREE major tipping point
factors ARE: clarity, simplicity, extensibility. And efficiency.
Among the many factors in deciding the tipping point are: (etc.,
etc.)

-- 
Neil Cerutti



More information about the Python-list mailing list