import reassignment different at module and function scope

B

Brendan Miller

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

If I:

import sys

sys = sys.version

This executes find but:

import sys

def f():
sys = sys.version

This gives an error indicating that the sys on the right hand side of =
is undefined. What gives?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmD/mMACgkQ4eGWG/zYzOmrWgCbBLuD2HNDJJly3Z1KCPoNOB1G
sDgAoJ+gMCt9hWKuDUN30VUP40zqtbmJ
=+pND
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top