I am trying out Python for a new project, and in that state, need some global variable. To test without changing the hardcoded value, I've tried to make a function that reassign thoses variables:
foo = None;
def setFoo(bar):
global foo = bar;
setFoo(1);
However, this get:
File ".\test.py", line 4
global foo = bar;
^
SyntaxError: invalid syntax
I've already read two questions higly related to my problem, but obviously missed some gotcha of Python.
Could anyone enlighten me?