我正在使用@classobj
. 我不仅在设置变量,还在新类中调用方法:
class Example:
def __init__(self):
pass
@classmethod
def constructor1(cls,x,y):
self=cls
self.__x = x
self.__somemethod(self,y)
...
我收到以下错误:
unbound method __somemethod() must be called with Example instance as
first argument (got classobj instance instead)
我该如何解决这个问题?