remove has_key for python3