has_key has been removed in Python 3. The in comparison operator can be used instead.
LGTM.
Thanks for the review @gbedwell @MaskRay
I will commit it shortly.