Gregory Piñero wrote:
> I didn't realize Python behaved like this. Is there an FAQ I can read on
> this?
I'll explain step by step:
> FILE module1.py:
> VAR1='HI'
>
> FILE MAIN.py:
> from module1 import *
> import module1
Here you have, in your module scope, a name 'VAR1' that points to "HI"
En Thu, 01 Feb 2007 19:33:50 -0300, Gregory Piñero <[EMAIL PROTECTED]>
escribió:
> I didn't realize Python behaved like this. Is there an FAQ I can read
> on this?
>
> FILE module1.py:
> VAR1='HI'
>
> FILE MAIN.py:
> from module1 import *
> import module1
>
> print VAR1
> print module1.VAR1
>
I didn't realize Python behaved like this. Is there an FAQ I can read on this?
FILE module1.py:
VAR1='HI'
FILE MAIN.py:
from module1 import *
import module1
print VAR1
print module1.VAR1
VAR1='bye'
print VAR1
print module1.VAR1
And the results are:
>>> HI
HI
bye
HI
It seems to use module1.V