MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / lru_cache

Function lru_cache

pythonmemorymodule/pefile.py:50–64  ·  view source on GitHub ↗
(maxsize=128, typed=False, copy=False)

Source from the content-addressed store, hash-verified

48# this is enough with copy.copy taken from
49# https://stackoverflow.com/questions/54909357
50def lru_cache(maxsize=128, typed=False, copy=False):
51 if not copy:
52 return functools.lru_cache(maxsize, typed)
53
54 def decorator(f):
55 cached_func = functools.lru_cache(maxsize, typed)(f)
56
57 @functools.wraps(f)
58 def wrapper(*args, **kwargs):
59 # return copymod.deepcopy(cached_func(*args, **kwargs))
60 return copymod.copy(cached_func(*args, **kwargs))
61
62 return wrapper
63
64 return decorator
65
66
67@lru_cache(maxsize=2048)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected