运行python脚本,报错object() takes no parameters
classA():def_init_(self,a,b):self.a=aself.b=bdefadd(self):returnself.a+self.bcount=A(...
class A():
def _init_(self, a, b):
self.a = a
self.b = b
def add(self):
return self.a + self.b
count = A(4,5)
print (count.add()) 展开
def _init_(self, a, b):
self.a = a
self.b = b
def add(self):
return self.a + self.b
count = A(4,5)
print (count.add()) 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询