New subclass vs option in __init__

Carl Banks pavlovevidence at gmail.com
Fri Dec 7 11:30:54 EST 2007


On Dec 7, 9:36 am, Neil Cerutti <horp... at yahoo.com> wrote:
> On 2007-12-07, Carl Banks <pavlovevide... 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.)

..., lots of experience, 20/20 foresight, a good Ouija board,
luck, ....


Carl Banks



More information about the Python-list mailing list