Вот создал первый класс по учебнику
>>> def f1(self,x,y):
return min(x,x+y)
>>> class C:
f = f1
def g(self):
return"I_LOVE_YOU"
h=g
C.h()
Traceback (most recent call last):
File "<pyshell#83>", line 1, in <module>
C.h()
TypeError: unbound method g() must be called with C instance as first argument (got nothing instead)
>>> C.f(5,7)
Traceback (most recent call last):
File "<pyshell#84>", line 1, in <module>
C.f(5,7)
TypeError: unbound method f1() must be called with C instance as first argument (got int instance instead)