[Tutor] imported module/global

Cecilia Alm ebbaalm at uiuc.edu
Sun Apr 15 17:49:10 CEST 2007


If a module "x" imports module "y" with a global variable "z", then
this global can be referred or assigned to in "x" with the syntax
"y.z" (no "global" keyword preceding) and changes are accessible to
class methods in "y" referring to "global z".

I assume this is related to namespace/scope?

Thanks!


More information about the Tutor mailing list