Replaced deprecated has_key.

has_key is gone in python 3.x.

http://docs.python.org/3.1/whatsnew/3.0.html#builtins