% cat multiply.py var = 10 def multiply(x): var *= x multiply(10) print var % python multiply.py Traceback (most recent call last): File "./multiply.py", line 6, in ? multiply(10) File "./multiply.py", line 4, in multiply var *= x UnboundLocalError: local variable 'var' referenced before assignment