Code: Alles auswählen
In [113]: f()
---------------------------------------------------------------------------
UnboundLocalError Traceback (most recent call last)
<ipython-input-113-c43e34e6d405> in <module>
----> 1 f()
<ipython-input-112-559a327f4cd1> in f()
----> 1 def f(): x += 1
UnboundLocalError: local variable 'x' referenced before assignment