Question about subclassing - version 2

Frank Millman frank at chagford.com
Fri Sep 8 10:55:18 EDT 2006


Bruno Desthuilliers wrote:
> Frank Millman wrote:
> >
> > I have not gone to the trouble of raising NotImplementedError - the
> > methods that the subclasses *must* override just have a 'pass'
> > statement. I guess it would be more correct to raise the error, as it
> > would give me a quicker indication of an error if I happened to omit
> > one, but in practice I would find out pretty quickly anyway.
>
> Mmm... My own experience is that methods that *must* be redefined are
> better raising NotImplementedError. Makes things more obvious IMHO.
>

Can't argue with that. I have just gone through my app and changed them
all :-)

Frank




More information about the Python-list mailing list