您的位置: 首页 > IT文章 > python调用对象属性出错:AttributeError: 'function' object has no attribute '_name_' python调用对象属性出错:AttributeError: 'function' object has no attribute '_name_' 分类: IT文章 • 2024-03-24 20:29:06 出错如下图所示: 原来是因为把__name__写成_name_, 下图为正确结果: