类初始化失败

时间:2017-06-18 03:02:16

标签: python class in-class-initialization

Traceback (most recent call last):
  File "dog.py", line 13, in <module>
    d = Dog('Fido')
TypeError: object() takes no parameters

错误报告:

tapply()

1 个答案:

答案 0 :(得分:4)

你有一个错字。方法__int__应称为__init__