OO design

Dave Cook davecook at nowhere.net
Tue Jul 19 20:45:22 CEST 2005


On 2005-07-19, chris <cf_1957 at hotmail.com> wrote:

> I've been scripting with python for a while now. Basically writing a few
> functions and running in the ipython shell. That's been very useful. But the
> more I do this the more I see that I'm doing more or less the same thing
> over and over again. 

When that happens, it's probably a good sign that you need to create a
module for that functionality.

As for OO in Python, IMO it's best just to dive in and not worry about being
"methodologically correct" at first.  Unfortunately, most books on OO use
static languages for their examples, which usually obscures concepts that
are extremely simple in Python.  Books using Smalltalk are not too bad,
though, for example _Smalltalk, Objects, and Design_ by Chamond Liu.

Book chapters on Python OO basics:

http://diveintopython.org/object_oriented_framework/index.html
http://www.ibiblio.org/g2swap/byteofpython/read/oops.html
http://www.pasteur.fr/formation/infobio/python/ch18.html

fraca7 series on design patterns, where the moral of the story is often
"You don't need to do that in Python.":

http://fraca7.free.fr/blog/index.php?Python

Dave Cook









More information about the Python-list mailing list