TypeError: Dog() takes no arguments

报错有两个原因:

1.在python中构造函数书写格式是__init__,而不是_init_,即在init两侧都是双下划线,不是单下划线。

2.在python中构造函数书写格式是__init__,而不是__int__。

相关文章: