Skip to content

Commit

Permalink
add __hash__ method to be able to use a bucket object inside a set or…
Browse files Browse the repository at this point in the history
… a dictionary
  • Loading branch information
GreatBahram committed Mar 10, 2021
1 parent e304d85 commit d42ec37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions minio/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ def __eq__(self, other):
return self.name == other
return NotImplemented

def __hash__(self):
return hash(self.name)


class ListAllMyBucketsResult:
"""LissBuckets API result."""
Expand Down

0 comments on commit d42ec37

Please sign in to comment.