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

Function fixedpropety

windows/utils/pythonutils.py:13–22  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

11
12
13def fixedpropety(f):
14 cache_name = "_" + f.__name__
15
16 def prop(self):
17 try:
18 return getattr(self, cache_name)
19 except AttributeError:
20 setattr(self, cache_name, f(self))
21 return getattr(self, cache_name)
22 return property(prop, doc=f.__doc__)
23
24# Slow fix of the typo :)
25fixedproperty = fixedpropety

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected