imported var not being updated

John Posner jjposner at
Tue Mar 9 15:18:42 CET 2010

On 3/8/2010 11:55 PM, Gary Herron wrote:
> The form of import you are using
> from helpers import mostRecent
> makes a *new* binding to the value in the module that's doing the
> import.


> What you can do, is not make a separate binding, but reach into the
> helpers module to get the value there. Like this:
> import helpers
> print helpers.mostRecent

Gary, are you asserting that in these separate situations:

   from helpers import mostRecent
   x = mostRecent

   import helpers
   x = helpers.mostRecent

... the name "x" will be bound to different objects?


More information about the Python-list mailing list