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

可以改成以下形式:

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

 

相关文章: