Conflicting needs for __init__ method
bignose+hates-spam at benfinney.id.au
Wed Jan 17 21:27:28 CET 2007
Chuck Rhode <CRhode at LacusVeris.com> 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 |
More information about the Python-list