Skip to content

LGTM Alert regarding hash and eq #1743

Closed
@onlinejudge95

Description

@onlinejudge95

We currently have a LGTM alert. The class defines a __hash__ method without defining an __eq__ method.

According to Python docs

If a class does not define an eq() method it should not define a hash() operation either; if it defines eq() but not hash(), its instances will not be usable as items in hashable collections.

Should we go ahead with a PR for the same?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions