[Tutor] dict vs several variables?
Leam Hall
leamhall at gmail.com
Sat Feb 18 00:54:18 CET 2012
On 02/17/2012 09:26 AM, Dave Angel wrote:
> There are two ways to think of a class. One is to hold various related
> data, and the other is to do operations on that data. If you just
> consider the first, then you could use a class like a dictionary whose
> keys are fixed (known at "compile time").
I think a class is the way to go for a couple reasons. First, of course,
is that it pushes me to learn more. It also lets me encapsulate a lot of
the work into one thing and keep the methods there.
Thanks!
Leam
More information about the Tutor
mailing list