Conflicting needs for __init__ method

Ben Finney bignose+hates-spam at
Wed Jan 17 21:27:28 CET 2007

Chuck Rhode <CRhode at> writes:

> Ben Finney wrote:
> > I recommend, instead, separate factory functions for separate
> > input types.
> Uh, how 'bout separate subclasses for separate input types?

The resulting object in each case would be the same type ('Rational'),
with the same behaviour. Subclassing would make sense only if the
resulting objects needed to have different behaviour in each case.

 \             "The power of accurate observation is frequently called |
  `\     cynicism by those who don't have it."  -- George Bernard Shaw |
_o__)                                                                  |
Ben Finney

More information about the Python-list mailing list