From d42ec37019fa44033c6c9573424b78addbeadb24 Mon Sep 17 00:00:00 2001 From: GreatBahram Date: Wed, 10 Mar 2021 11:07:39 +0330 Subject: [PATCH] add __hash__ method to be able to use a bucket object inside a set or a dictionary --- minio/datatypes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/minio/datatypes.py b/minio/datatypes.py index 0d86a704e..99cd364d9 100644 --- a/minio/datatypes.py +++ b/minio/datatypes.py @@ -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."""