热门搜索 :
考研考公
您的当前位置:首页正文

python 中TypeError:'dict'

来源:东饰资讯网

TypeError:'dict' object is not callable原因分析:

  1. 代码里重新定义了dict,比如 dict= { },这时你自己调用的是代码里定义的dict而不是python内置类型

  2. 取字典内容时用了()而不是[]。比如sdict("content_id"),应该是sdict["content_id"]

Top