Python 异常错误记录

来源:互联网 发布:dot js 是什么 编辑:程序博客网 时间:2024/05/18 16:18


1.   class_A instance has no attribute '__getitem__'

出错原因:

类中的函数参数没写self,    函数第一个参数为args,   取值时用v=args[0],   当类中的其他函数使用该函数时报错