Unification of Methods and Functions
James Moughan
moughanj at tcd.ie
Tue May 18 20:00:12 EDT 2004
David MacQuigg <dmq at gain.com> wrote in message news:<gtoja0h3jub75ocnr7da8ho8i5lpihc432 at 4ax.com>...
> On Mon, 17 May 2004 16:40:00 +1200, Greg Ewing
> <greg at cosc.canterbury.ac.nz> wrote:
>
> >David MacQuigg wrote:
> >> James has been telling me it is terribly wrong to keep data as
> >> attributes of classes
> >
[snip]
>
> This makes a lot more sense than a total ban on data in classes.
>
Just to clarify, once again - I was not suggesting a ban on data in
classes - I was objecting to the specific way in which the data was
being passed around and used in the class heirarchy.
> I think the generalization to a "multi-zoo" program probably belongs
> in the third example, along with perhaps some techniques like James
> showed to make the code more robust by generating the classes rather
> than writing them. The first and second examples ( Animals_1 and
> Animals_2 need to be very simple.
>
> -- Dave
More information about the Python-list
mailing list