help with class
Chris Rebert
clp at rebertia.com
Wed Nov 26 20:31:21 EST 2008
On Wed, Nov 26, 2008 at 5:21 PM, tekion <tekion at gmail.com> wrote:
> 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.
Yes. Global == module-level.
Cheers,
Chris
--
Follow the path of the Iguana...
http://rebertia.com
> --
> http://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list