MCPcopy Index your code
hub / github.com/python/cpython / wrapper

Function wrapper

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.85
addMethod · 0.45
discardMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…