首页 > 其他 > 详细

调用类方法时报错:missing 1 required positional argument: 'self'

时间:2020-07-20 22:15:57      阅读:638      评论:0      收藏:0      [点我收藏+]

调用类方法时报错:missing 1 required positional argument: ‘self‘

技术分享图片

 

这种情况是因为在调用方法时,没有提前定义这个类的实例,导致无法返回。只要先定义一个实例就可以了

技术分享图片

 

调用类方法时报错:missing 1 required positional argument: 'self'

原文:https://www.cnblogs.com/hehehe-wy7/p/13347351.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!