Use in replacing has_key

`in` is definitely more pythonic. [has_key() was removed in Python 3.x.](http://docs.python.org/3.1/whatsnew/3.0.html#builtins)