deprecation of has_key?

nicksjacobson at yahoo.com nicksjacobson at yahoo.com
Thu Apr 21 03:48:35 EDT 2005


I haven't heard of any plans to deprecate the dictionary has_key
method, as the "in" keyword makes it obsolete.

i.e.
if key in dict:

instead of
if dict.has_key():


Is there some reason to keep has_key?

--Nick




More information about the Python-list mailing list