You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
190 B
9 lines
190 B
2 years ago
|
from abc import ABC
|
||
|
|
||
|
|
||
|
class MyHashable(ABC):
|
||
|
@classmethod
|
||
|
def __subclasshook__(cls, sbcls):
|
||
|
hash_func = getattr(sbcls, "__hash__", None)
|
||
|
return hash_func is not None
|