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
相關文章
相關標籤/搜索