python调用类内创建对象时,显示object has no attribute

AttributeError: 'PtnDataset' object has no attribute 'image_list'

明明已经定义了,为什么会没有呢?

图片[1] - python调用类内创建对象时,显示object has no attribute - MaxSSL

如果你不是因为双下划线忽略,那么还有一种可能就是python有个内置函数__int__(),也会显示成紫色,和__init__()长得也太像了把!

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享