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()方法已经被废除了。

posted @ 2019-09-30 23:31  r0xFED  阅读(1752)  评论(0编辑  收藏  举报