[Tutor] OO re-factoring (was Pythonese/Efficiency/Generalese critique)

Lee Cullens leec03273 at mac.com
Wed Jun 8 05:34:21 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/ 
Generalese critique.

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:
http://homepage.mac.com/lee_cullens/DirTreeToCSV.zip

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.

Thanks,
Lee C





More information about the Tutor mailing list