Python3实现任务时报错,不知错哪里。
class Person(object):
def __int__(self, name, gender, birth, **kw):
self.name = name
self.gender = gender
self.birth = birth
for k, v in kw.items():
setattr(self,k,v)
xiaoming=Person('Xiao Ming','Male','1990-1-1',job='Student')
print(xiaoming.name)
print(xiaoming.job)
哪位大牛能帮我看看不,为啥python3输入以上代码会报错说:
TypeError: object() takes no parameters