Error in small code
Miki Tebeka
miki.tebeka at zoran.com
Thu Jun 3 08:31:30 CEST 2004
Hello Bruno,
> How come it says that pturn is a local variable if it is declared AND
> asigned a value in the beggining of the code!?!?!
By default Python guesses all variables used in a function are local to
the function. Add the line "global pturn" so it'll know `pturn' is a
global variable.
See http://docs.python.org/tut/node6.html#SECTION006600000000000000000
Bye.
--
-------------------------------------------------------------------------
Miki Tebeka <miki.tebeka at zoran.com>
The only difference between children and adults is the price of the toys.
More information about the Python-list
mailing list