Error in small code

Miki Tebeka miki.tebeka at
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.


Miki Tebeka <miki.tebeka at>
The only difference between children and adults is the price of the toys.

More information about the Python-list mailing list