Ben Finney wrote: > Tobiah <[EMAIL PROTECTED]> writes: > >> This is a little surprising. So "from mod import *" really copies >> all of the scalars into new variables in the local namespace. > > No. Nothing is copied. All the objects (remembering that in Python, > *everything* is an object) created by the code in module 'mod' are > given names in the current namespace.
Yeah, copied. Just as in: >>> a = 3 >>> b = a >>> a = 5 >>> b 3 >>> given b.py: ########################## thing = 0 ########################## and a.py: ########################## from b import * import b print thing print b.thing b.thing = 1 print b.thing print thing ########################### 0 0 1 0 -- Posted via a free Usenet account from http://www.teranews.com -- http://mail.python.org/mailman/listinfo/python-list