A global variable is being accessed in a local scope before it has been defined with a global
statement.
Doing so will raise a SyntaxError
.
var = "Some Value"
def foo():
var = "New value"
global var
...
var = "Some Value"
def foo():
global var
var = "New value"
...