[Tutor] Setting a global variable on class initialisation
Danny Yoo
dyoo at hkn.eecs.berkeley.edu
Thu Apr 27 21:05:00 CEST 2006
> I know that overall Global variables are bad idea, however, I have a
> situation where on on initialisation of a class, I need to read in two
> files and then populate two lists.
Hi Max,
Could you give more context to this problem? I'm not sure we get it yet.
*grin*
> The lists need to would appear to need to be outwith the class I am
> working with and global.
Are the lists a part of the "state" of the instance? If not, why is this
a part of the instance's initialization?
I think we'd better wait on advice until we learn a little more about the
situation.
Good luck!
More information about the Tutor
mailing list