MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / wrapper

Function wrapper

tools/python-3.11.9-amd64/Lib/reprlib.py:15–24  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

13 repr_running = set()
14
15 def wrapper(self):
16 key = id(self), get_ident()
17 if key in repr_running:
18 return fillvalue
19 repr_running.add(key)
20 try:
21 result = user_function(self)
22 finally:
23 repr_running.discard(key)
24 return result
25
26 # Can't use functools.wraps() here because of bootstrap issues
27 wrapper.__module__ = getattr(user_function, '__module__')

Callers

nothing calls this directly

Calls 3

idFunction · 0.50
addMethod · 0.45
discardMethod · 0.45

Tested by

no test coverage detected