OO refactoring trial ??

Chinook chinook.nr at tds.net
Tue Jun 28 22:36:48 EDT 2005


Paul,

Going back over various material led to another question regarding your 
comments.  

> - I'm not keen on the coupling of forcing your A,B,etc. classes to
> inherit from MF.  Especially in a duck-typing language like Python, it
> adds no value, the subclasses receive no default behavior from their
> superclass, and I'm not keen on using the inheritance hierarchy to
> register test classes.

The latter (__subclasses__() bit) I picked up on as a convenience (courtesy 
of a suggestion by STeVe) and I understand your point about more explicit 
ordering.  However, the former seems to take issue with examples like:

http://jamesthornton.com/eckel/TIPython/html/Sect08.htm 

or indirectly as a show stopper (using inheritance) as in:

http://www.unc.edu/~mconway/mt_static/archives/odds_and_ends/

which is more in line with your comments.  

Anything more to this than individual preferences?  Might it not be more 
explicit at least?  Anyone?  

Thanks,

Lee C






More information about the Python-list mailing list