MCPcopy Create free account
hub / github.com/BIT-DataLab/LakeBench / DictSetStorage

Class DictSetStorage

join/LSH/datasketch/storage.py:241–252  ·  view source on GitHub ↗

This is a wrapper class around ``defaultdict(set)`` enabling it to support an API consistent with `Storage`

Source from the content-addressed store, hash-verified

239
240
241class DictSetStorage(UnorderedStorage, DictListStorage):
242 '''This is a wrapper class around ``defaultdict(set)`` enabling
243 it to support an API consistent with `Storage`
244 '''
245 def __init__(self, config):
246 self._dict = defaultdict(set)
247
248 def get(self, key):
249 return self._dict.get(key, set())
250
251 def insert(self, key, vals, **kwargs):
252 self._dict[key].update(vals)
253
254
255if cassandra is not None:

Callers 1

unordered_storageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected