We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 930dfc1 commit 6128951Copy full SHA for 6128951
pydra/utils/hash.py
@@ -107,6 +107,17 @@ def __bytes_repr__(self, cache: Cache) -> Iterator[bytes]:
107
108
@singledispatch
109
def bytes_repr(obj: object, cache: Cache) -> Iterator[bytes]:
110
+ """Default implementation of hashing for generic objects. Single dispatch is used
111
+ to provide hooks for class-specific implementations
112
+
113
+ Parameters
114
+ ----------
115
+ obj: object
116
+ the object to hash
117
+ cache : Cache
118
+ a dictionary object used to store a cache of previously cached objects to
119
+ handle circular object references
120
+ """
121
cls = obj.__class__
122
yield f"{cls.__module__}.{cls.__name__}:{{".encode()
123
dct: Dict[str, ty.Any]
0 commit comments