removed has_key for python3