dict.has_key() is not supported in python3