Python dict.has_key() 的说明

        Python dict.has_key()方法仅限于Python 2.x使用,对于3.x,此方法已废除。

        对于Python 2.x中的dict.has_key()方法,官方文档的说明如下:https://docs.python.org/2/library/stdtypes.html#mapping-types-dict

        对于Python 3.x中的dict相关方法,官方文档的说明如下:https://docs.python.org/3.7/library/stdtypes.html#mapping-types-dict, 可以发现dict.has_key()方法已经被废除了。

猜你喜欢

转载自www.cnblogs.com/r0xFED/p/11614497.html