python 提示错误AttributeError: type object 'str' has no attribute '_name_'

在作《Machine Learning in Action》书中的第三章绘制树形图时遇到了这个问题AttributeError: type object 'str' has no attribute '_name_'python 很明显是if type(secondDict[key])._name_  == ‘dict’:这一句有问题,在python3中并无type(secondDict[key]
相关文章
相关标签/搜索