help with class

tekion tekion at gmail.com
Wed Nov 26 20:21:42 EST 2008


Hi,
so I am assuming global name space refers to the location of where the
module is imported, for example my previous example where I call the
gzip module from test_class class, like so:

class test_class:
   import gzip

did not work because of scoping. So global name space in this case is
declaring the import outside of test_class like so:

import gzip
class test_class:
   etc..

Is my assumption correct?  Thanks.



More information about the Python-list mailing list