Dictionnary vs Class for configuration
Y2KYZFR1
jarrodhroberson at yahoo.com
Fri Apr 30 23:06:47 EDT 2004
Donn Cave <donn at u.washington.edu> wrote in message news:<donn-EB7C7F.13060030042004 at nntp1.u.washington.edu>...
> In article <40929016$0$8635$626a14ce at news.free.fr>,
> "Famille Delorme" <fadelorme at free.fr> wrote:
> ...
> > I want know :
> > - what is more faster, dictionnary method or class method?
> > - what use more ram memory ?
> > - if you are administrator, what method you like for configure program ?
>
> I think there would be some arguments in favor of a class, but
> they're not very important - at least, they're certainly not
> evident in your example. But you raise an important point, about
> efficiency.
>
> It isn't important, and you shouldn't think about anything else
> until you understand this.
>
> I mean, not that efficiency isn't important in general - it
> certainly is - but not for a configuration record. It will
> have only a handful of parameters, one or two instances in
> the whole program. This is absurdly trivial. Some time,
> see if you can determine how much Python actually does just
> to start itself up each time. Just for perspective.
>
> Don't worry about the efficiency of a construct that you aren't
> going to exercise very hard. Worry instead about maintainability,
> because that's where software more commonly meets its fatal end.
> Think about what your instructor is saying in that context.
>
> Donn Cave, donn at u.washington.edu
listen do Donn! He is the only one that has given the right answer :-)
More information about the Python-list
mailing list