Repository URL to install this package:
Version:
1.3.0 ▾
|
lru-dict
/
_lru.cpython-312.so
|
---|
ELF 4 ¼9 4 ( 4 4 4 P3 P3 @ P3 Ps Ps \ ° @ ¬4 ¬´ ¬´ T T @ \3 \s \s È È RåtdP3 Ps Ps \ ° PåtdH H H Qåtd T T T ¼ ¼ Android r27c 12479018 GNU и=ü<xÇÀQW'ѢI¶, ; M Z k ~ ¦ ³ Ï Þ ï ÿ + ; G S a o ¢ ¹ Ê Ù / ` ¯ å c í SMå __cxa_finalize __cxa_atexit __register_atfork PyInit__lru PyType_GenericNew PyType_Ready PyModule_Create2 PyModule_AddObject _Py_Dealloc PyObject_Free PyObject_Repr PyDict_Clear PyArg_ParseTupleAndKeywords _Py_NoneStruct PyCallable_Check PyExc_TypeError PyDict_New PyExc_ValueError PyErr_SetString PyDict_Contains PyDict_Size PyErr_Clear _PyObject_New Py_BuildValue PyObject_CallObject _Py_FalseStruct _Py_TrueStruct PyList_New PyTuple_New PyArg_ParseTuple PyExc_KeyError PyDict_Next libc.so LIBC libm.so libpython3.12.so libdl.so Ps Ts Xs ¸´ Ĵ ش µ µ µ ¨µ °µ ´µ Ե ðµ ¶ `¶ d¶ ¶ ¨¶ ¬¶ °¶ ´¶ ¸¶ 6 Ķ ȶ ж Զ ض à¶ ä¶ è¶ ð¶ ô¶ ø¶ · · · · · · · $· (· 0· 4· 8· @· D· H· P· T· X· `· d· h· p· t· x· · · · · · · · ¤· ¨· °· ´· ¸· 7 Է ط à· ä· ì· ô· ø· $t (t ,t 0t 4t 8t <t Lt Pt Tt Xt \t `t dt ht lt pt tt xt |t t t t t t t t t t ¤t ¨t L.__contains__(key) -> Check if key is there in L L.get_stats() -> returns a tuple with cache hits and misses least_recent i values n|O n keys L.has_key(key) -> Check if key is there in L popitem(): LRU dict is empty set_callback has_key L.setdefault(key, default=None) -> If L has key return its value, otherwise insert key with a value of default and return default set_size L.update() -> update value for key in LRU L.get(key, default=None) -> If L has key return its value, otherwise default Size should be a positive number get L.get_size() -> get size of LRU items get_size _lru.Node _lru.LRU L.items() -> list of L's items (key,value) in MRU order popitem nn setdefault L.clear() -> clear LRU LRU O|O _lru L.values() -> list of L's values in MRU order clear O L.set_size() -> set size of LRU default L.keys() -> list of L's keys in MRU order pop update key Linked List Node __contains__ L.peek_first_item() -> returns the MRU item (key,value) without changing key order get_stats peek_first_item L.peek_last_item() -> returns the LRU item (key,value) without changing key order |p |O OO L.pop(key[, default]) -> If L has key return its value and remove it from L, otherwise return default. If default is not given and key is not in L, a KeyError is raised. callback peek_last_item O:set_callback L.set_callback(callback) -> set a callback to call when an item is evicted. parameter must be callable size L.popitem([least_recent=True]) -> Returns and removes a (key, value) pair. The pair returned is the least-recently used if least_recent is true, or the most-recently used if false. LRU(size, callback=None) -> new LRU dict that can store up to size elements An LRU dict behaves like a standard dict, except that it stores only fixed set of elements. Once the size overflows, it evicts least recently used items. If a callback is set it will call the callback with the evicted key and item. Eg: >>> l = LRU(3) >>> for i in range(5): >>> l[i] = str(i) >>> l.keys() [2,3,4] Note: An LRU(n) can be thought of as a dict that will have the most recently accessed n items. ; " H 4 x \ p ¸ ¬ è à È L 8 | h ¤ h ä ¨ X À ð ¸ h P x x ¸ P ( À 8 ¨ T Ø À , ø À ¨ P H x ¼ ¨ ð , h zR | $ # ACEAWA D X $ l ACEASA 0 / ACEAIMDA HA 0 È - ACEAMDDD HA 4 ü ü ¯ AAAC E$A AAA , 4 t d AAAEAXAA $ d ´ $ ACEAXA <