Python3 字典无has_key()方法,调用报AttributeError: 'dict' object has no attribute 'has_key'错误

可以改成以下形式:

if locatorMethod.lower() in self.locationTypeDict.keys():

 

posted on 2018-08-01 09:20  oohy  阅读(3704)  评论(0编辑  收藏  举报