has_key

'dict' object has no attribute 'has_key'

当我在一次写下如下代码时,报错AttributeError: 'dict' object has no attribute 'has_key': if not my_dict.has_key(my_key): 当时真的是一脸懵逼,我在Python2的时候一直这样写的,为什么会错呢? 后来经过查询文档 ......
39 attribute has has_key object
共1篇  :1/1页 首页上一页1下一页尾页