OO re-factoring (was Pythonese/Efficiency/Generalese critique [on Tutor])
lee_cullens at mac.com
Wed Jun 8 06:52:06 CEST 2005
In my original post I noted my recent exposure to Python and put up a
little utility to my iDisk asking for a Pythonese/Efficiency/
Javier, Kent and Liam were gracious enough to offer comments, which
were greatly appreciated. To follow through with the learning
exercise, I incorporated their comments (at least the ones there were
no conflicting opinions on :~) and put up the new version as:
I was thinking of extending the learning exercise by re-factoring it
as an OO approach, since it would contain a minimum altered method.
Being new to OOP also though, I'm confusing myself with how that
would be best accomplished. My thinking is that class/subclass
method instances would replace the recursive functions approach, but
have as yet not formed the coding in my mind.
I've read a lot on OOP, but seem to have a problem with the practical
use of such in this utility. I'm undoubtedly creating a mountain of
an ant hill in my mind, so any thoughts would be appreciated.
More information about the Python-list