参考:https://stackoverflow.com/questions/57258281/typeerror-init-takes-2-positional-arguments-but-4-were-given
MyBook(title,author,price)
will pass four arguments: (self, title, author, price)
会多了一个self的参数
[LeetCode]TypeError: xxx takes 2 positional arguments but 4 were
阅读 73
2022-08-04
参考:https://stackoverflow.com/questions/57258281/typeerror-init-takes-2-positional-arguments-but-4-were-given
MyBook(title,author,price)
will pass four arguments: (self, title, author, price)
会多了一个self的参数
相关推荐
精彩评论(0)