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

可以改成以下形式:

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

 

相关文章:

  • 2022-12-23
  • 2021-07-14
  • 2022-12-23
  • 2022-01-11
  • 2022-12-23
  • 2021-11-03
  • 2022-12-23
猜你喜欢
  • 2021-10-23
  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
  • 2021-05-19
  • 2021-04-18
相关资源
相似解决方案