Re: Odd behaviour on importing variable from module

2008-08-23 Thread rs387
> the construct > > from oddmodule import OddVariable, OddFunction > > assigns the *values* of the given module names to new variables in the > importing module's namespace. that is, you're binding new names to the > values the variables happen to have when the from-import statement is > exec

Re: Odd behaviour on importing variable from module

2008-08-23 Thread Peter Otten
rs387 wrote: > I've found the following behaviour on importing a variable from a > module somewhat odd. The behaviour is identical in Python 2.5 and > 3.0b2. > > In summary, here's what happens. I have a module, oddmodule.py > (below), that defines a variable, OddVariable, by assigning a value A

Re: Odd behaviour on importing variable from module

2008-08-23 Thread Fredrik Lundh
rs387 wrote: I've found the following behaviour on importing a variable from a module somewhat odd. The behaviour is identical in Python 2.5 and 3.0b2. the construct from oddmodule import OddVariable, OddFunction assigns the *values* of the given module names to new variables in the imp

Odd behaviour on importing variable from module

2008-08-23 Thread rs387
Hi, I've found the following behaviour on importing a variable from a module somewhat odd. The behaviour is identical in Python 2.5 and 3.0b2. In summary, here's what happens. I have a module, oddmodule.py (below), that defines a variable, OddVariable, by assigning a value A to it. The file I exe