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.
|
from abc import ABC
|
|
|
|
|
|
class MyHashable(ABC):
|
|
@classmethod
|
|
def __subclasshook__(cls, sbcls):
|
|
hash_func = getattr(sbcls, "__hash__", None)
|
|
return hash_func is not None
|
|
|