Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz/python-cookbook
/ example1.py
File
example1.py
src/9/defining_decorators_as_classes/example1.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
# Example of defining a decorator as a class
2
import
types
3
from
functools
import
wraps
4
Callers
nothing calls this directly
Calls
3
add
Function · 0.70
Spam
Class · 0.70
bar
Method · 0.45
Tested by
no test coverage detected