class Idiot object def marazm self def make_me_stupid global print mak

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class Idiot(object):
def marazm(self):
x = 1
def make_me_stupid():
global x
x+=1
print x
make_me_stupid()
print x
idiot = Idiot()
idiot.marazm()
1
Traceback (most recent call last):
File "D:\PROJECTS\OMPD\source\_dig.py", line 66, in <module>
idiot.marazm()
File "D:\PROJECTS\OMPD\source\_dig.py", line 62, in marazm
make_me_stupid()
File "D:\PROJECTS\OMPD\source\_dig.py", line 60, in make_me_stupid
x+=1
NameError: global name 'x' is not defined