/opt/imh-python/lib/python3.9/site-packages/kombu/utils
NameSizeModeActions
__pycache__/-0755rm
amq_manager.py7160644editdlrm
collections.py9420644editdlrm
compat.py34440644editdlrm
debug.py20490644editdlrm
div.py9410644editdlrm
encoding.py22970644editdlrm
eventio.py101590644editdlrm
functional.py106990644editdlrm
imports.py20890644editdlrm
json.py40880644editdlrm
limits.py25510644editdlrm
objects.py20430644editdlrm
scheduling.py29270644editdlrm
text.py22000644editdlrm
time.py2720644editdlrm
url.py39090644editdlrm
uuid.py3270644editdlrm
__init__.py6980644editdlrm
Edit: /opt/imh-python/lib/python3.9/site-packages/kombu/utils/collections.py (942B)
"""Custom maps, sequences, etc.""" from __future__ import annotations class HashedSeq(list): """Hashed Sequence. Type used for hash() to make sure the hash is not generated multiple times. """ __slots__ = 'hashvalue' def __init__(self, *seq): self[:] = seq self.hashvalue = hash(seq) def __hash__(self): return self.hashvalue def eqhash(o): """Call ``obj.__eqhash__``.""" try: return o.__eqhash__() except AttributeError: return hash(o) class EqualityDict(dict): """Dict using the eq operator for keying.""" def __getitem__(self, key): h = eqhash(key) if h not in self: return self.__missing__(key) return super().__getitem__(h) def __setitem__(self, key, value): return super().__setitem__(eqhash(key), value) def __delitem__(self, key): return super().__delitem__(eqhash(key))