MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / trace

Function trace

example_code/item_066.py:226–238  ·  view source on GitHub ↗
(klass)

Source from the content-addressed store, hash-verified

224
225print("Example 9")
226def trace(klass):
227 for key in dir(klass):
228 if key in IGNORE_METHODS:
229 continue
230
231 value = getattr(klass, key)
232 if not isinstance(value, TRACE_TYPES):
233 continue
234
235 wrapped = trace_func(value)
236 setattr(klass, key, wrapped)
237
238 return klass
239
240
241print("Example 10")

Callers

nothing calls this directly

Calls 1

trace_funcFunction · 0.85

Tested by

no test coverage detected