This bad piece of code results in a strange error message
> a = 4
> def test():
... print a
... print type(a)
... a = a + 2
... print a
> test()
None
0
Traceback (most recent call first):
File "<ipm>", line 3, in test
File "<ipm>", line 1, in <ipm>
File "lib/ipm.py", line 102, in ipm
File "main.py", line 29, in main
TypeError detected by FileId 0x00 line 0
I don't know if this behaviour is still valid for more recent versions of pymite but in case it is, perhaps, there is an easy solution to fix this? Standard python complains this way...
UnboundLocalError: local variable 'a' referenced before assignment
... which sounds very reasonable.
Thank you for your time and support!
Michael