Using Classes

Neil Cerutti neilc at norwich.edu
Thu Jun 24 08:33:33 EDT 2010


On 2010-06-24, Bruno Desthuilliers
<bruno.42.desthuilliers at websiteburo.invalid> wrote:
> Not going into OO when you don't need it IS actually the
> "Python way" !-)

My most satisfying classes are the ones that gradually coalesce
from a functional program. They take actual shape during
refactoring.

I find classes to be the most successful when they improve my
conception of a program by gathering operations and data together
in a way that simplifies my program.

They have the least positive impact when I slap them together
early on, just to group up some data that appears to need
grouping.

It's pretty rare that I know the best operations for each bit of
data and how best to bundle that data until after a program is
functional. It is lucky my programs are relatively small. ;)

-- 
Neil Cerutti



More information about the Python-list mailing list