-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

abcd wrote:
> I have a file, "a.py"
>
> blah = None def go(): global blah blah = 5
>
>> From the python interpreter I try....
>
>>>> from a import * blah go() blah
>>>>
>
> ...i was hoping to see "5" get printed out the second time I
> displayed blah, but it doesn't. Now, if I type this same code
> directly into the python interpreter it works as i was hoping.
> what i am missing?
>
> thanks
>
"import" imports bindings between symbols and objects into
the module from another one. When you call a function in another
module, it changes global space of module where it is defined.
The global space of the module, where caller is in, is kept from touched
except accessing through module names.

- --
Thinker Li - [EMAIL PROTECTED] [EMAIL PROTECTED]
http://heaven.branda.to/~thinker/GinGin_CGI.py
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGAZYd1LDUVnWfY8gRAsdNAJ9niVqdGz1aG0NUzN+Ggmk+vnqZSgCfQB9s
SBuV/fWo8lqAytQP/QXQPXE=
=1BiL
-----END PGP SIGNATURE-----

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to