`

[LeetCode]TypeError: xxx takes 2 positional arguments but 4 were

 
阅读更多

参考: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的参数

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics