Alan Gauld wrote: > "Kent Johnson" <[EMAIL PROTECTED]> wrote >> The writings of Robert C Martin have taught me a lot about good >> design >> and agile development. They don't all apply to Python > > Martin is very good on Agile, I'm less impressed with his OO writing, > largely because he does tend to see the world through the eyes > of C++ and Java, both of which have a very singular view of OO > which does not always work in other more dynamic OOP > languages (Lisp, Smalltalk, Python, JavaScript etc)
I found his writing on principles of OO design very helpful when I was a C++ programmer. I admit I have not revisited them from the point-of-view of a Python programmer. I'm sure some of the techniques are not needed - the pervasive use of interfaces, in particular - but the underlying principles should still apply. Taking a closer look, I think these still have something to offer: The Liskov Substitution Principle http://objectmentor.com/resources/articles/lsp.pdf Inheritance vs. Delegation (Template Method and Strategy patterns) http://objectmentor.com/resources/articles/inheritanceVsDelegation.pdf The Craftsman series might be of interest. One thing to keep in mind is that when C++ and Java use interfaces, Python uses duck typing. C++ and Java use classes to encapsulate functions (e.g. in Strategy) but Python can use functions directly. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor