"xxx.has_key(a)" vs "a in xxx"

Łukasz Ligowski orangewarrior at gmail.com
Thu Oct 30 10:37:35 EDT 2008


Hi, 

There is small inconsistency (or I don't understand it right) between python 
2.5 docs and python 2.6 docs.

2.5 docs say that:
 "a.has_key(k) Equivalent to k in a, use that form in new code"

2.6 docs say that:
 "dict.has_key(key) is equivalent to key in d, but deprecated."

which is true?

L



More information about the Python-list mailing list