question about globals vars...

Shagshag13 shagshag13 at yahoo.fr
Fri Aug 2 16:47:43 CEST 2002


hello,

i'm wondering when i should use globals or if i should avoid them by fair means...
- so how do you use them or what mecanism do you use to avoid using them (in a class / in a function) ?
- when you do OO style do you define some kind of parameters class, which you instanciate and use ?
- is it a good idea to use a global as a flag : put it to 0 or 1 in main and then testing in other functions/class and changing way
of acting according to flag value ?
- or should i prefer to only use globals as default value for other vars ?

thanks for your advices,

s13.





More information about the Python-list mailing list