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

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