0

Class

what i have to do if i want to add new function in class exampl: class a: def f(self): print('x') i want add : def run(y): n= y+y return n should be: class a: def f(self): print('x') def run(self,y): n= y+y return n

31st May 2017, 6:57 AM
Kreez
Kreez - avatar
12 Antworten
+ 1
ok. thank you
31st May 2017, 7:25 AM
Kreez
Kreez - avatar
0
if i have some classes?
31st May 2017, 7:07 AM
Kreez
Kreez - avatar
0
exampl: class a: def g(self): print(True) class b: def r(self): print('hi') i want to add to class b new function: def f(): print (False)
31st May 2017, 7:15 AM
Kreez
Kreez - avatar
0
There is no other option?
31st May 2017, 7:19 AM
Kreez
Kreez - avatar
0
nothig. that all
31st May 2017, 7:20 AM
Kreez
Kreez - avatar
0
I just wanted to add a function
31st May 2017, 7:21 AM
Kreez
Kreez - avatar