> Thanks guys, I beginning to see the light again,
> and if X is mutual the story is completely different,
> I still have to get used to these differences.
That's supposed to be "mutable", not "mutual".
Diez
--
http://mail.python.org/mailman/listinfo/python-list
Sion Arrowsmith wrote:
> stef mientki <[EMAIL PROTECTED]> wrote:
>
>>def Run ():
>>print X <=== UnboundLocalError: local variable
>>'X' referenced before assignment
>>X = X + 1
>>
>> Why do I get the error ?
>> Printing isn't assigning anything or am I mi
stef mientki <[EMAIL PROTECTED]> wrote:
>def Run ():
>print X <=== UnboundLocalError: local variable
>'X' referenced before assignment
>X = X + 1
>
>Why do I get the error ?
>Printing isn't assigning anything or am I missing something.
>Now if I remove "X =
On 2007-08-14, stef mientki <[EMAIL PROTECTED]> wrote:
> I've thought many times I finally understood the import /
> namespace rules, but again I'm totally lost :-(
>
> This is my library file
>
> # Module lib_test.py
>
> X = 1
>
> def Init():
> global X
> X = 3
>
stef mientki a écrit :
> hello,
>
> I've thought many times I finally understood the import / namespace rules,
> but again I'm totally lost :-(
>
> This is my library file
>
># Module lib_test.py
>
>X = 1
>
>def Init():
>global X
>X = 3
>print 'Init', X
>
>
stef mientki wrote:
> hello,
>
> I've thought many times I finally understood the import / namespace rules,
> but again I'm totally lost :-(
>
> This is my library file
>
> # Module lib_test.py
>
> X = 1
>
> def Init():
> global X
> X = 3
> print 'Init', X