In article <[EMAIL PROTECTED]>, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> > Expected behavior if you 1) understand how Python variable binding > works, and 2) that "from <> import *" is equivalent to > > import <> > name1 = <>.name1 > name2 = <>.name2 > > IOWs, one is creating local names that are bound to the objects > inside the imported module. If, subsequently, one does > > name2 = 123 > > one has UNbound the connection to <>.name2 and rebound the local name to > the integer object 123. Whereas > > <>.name2 = 123 > > says "go into the module <>, and rebind its 'name2' to the integer > object 123"; since you "went inside" to do the rebinding, any other code > that also uses the <>.name2 reference will see the change inside <>. Ah! (light bulb goes on) Yes, I get it. Thanks. No more from ** import *. -- Lou Pecora (my views are my own) REMOVE THIS to email me. -- http://mail.python.org/mailman/listinfo/python-list