L i@dZdZGddeZefZdZdZdZdZy) z'Key functions for memoizing decorators.)hashkey methodkeytypedkeytypedmethodkeycteZdZdZdZej fdZejfdZejfdZdZ y) _HashedTuplezA tuple that ensures that hash() will be called no more than once per element, since cache decorators will hash the key multiple times on a cache miss. See also _HashedSeq in the standard library functools implementation. Nc@|j}|||x|_}|SN)_HashedTuple__hashvalue)selfhash hashvalues U/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/cachetools/keys.py__hash__z_HashedTuple.__hash__s*$$  +/: 5D yc&t|||Sr rr otheradds r__add__z_HashedTuple.__add__sCe,--rc&t|||Sr rrs r__radd__z_HashedTuple.__radd__sCt,--rciSr )r s r __getstate__z_HashedTuple.__getstate__s r) __name__ __module__ __qualname____doc__r tuplerrrrrrrrrs;K!NN "'.#(--.rrc |r3t|tt|jtzSt|S)z8Return a cache key for the specified hashable arguments.)rsumsorteditems_kwmark)argskwargss rrr%s4D3vflln'=w#GGHHD!!rct|i|S)z/Return a cache key for use with cached methods.)rr r&r's rrr.s D #F ##rct|i|}|td|Dz }|tdt|jDz }|S)z>Return a typed cache key for the specified hashable arguments.c32K|]}t|ywr type).0vs r ztypedkey..7s'Qa'sc38K|]\}}t|ywr r,)r._r/s rr0ztypedkey..8sr6s6- @58 /"$ %r