MCPcopy Create free account
hub / github.com/dabeaz/python-cookbook / example2.py

File example2.py

src/9/defining_decorators_as_classes/example2.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1# Reformulation using closures and function attributes
2from functools import wraps
3
4def profiled(func):

Callers

nothing calls this directly

Calls 3

addFunction · 0.70
SpamClass · 0.70
barMethod · 0.45

Tested by

no test coverage detected