Python's scope of variables should be intuitive, but for those that don't find it as such here's a quick example.
In the file below scope.py
I create a dummy class Temp()
which prints some debug text when its created and destroyed.
$ python scope.py
Initiating quick
Destroying quick
Initiating global
before scope
Initiating in-scope
Destroying in-scope
after scope
Destroying global