Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz/python-cookbook
/ example3.py
File
example3.py
src/9/defining_decorators_as_classes/example3.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
# Reformulation using closures and function attributes
2
# This example tests the composability of decorators
3
4
import
time
Callers
nothing calls this directly
Calls
4
add
Function · 0.70
Spam
Class · 0.70
countdown
Function · 0.70
bar
Method · 0.45
Tested by
no test coverage detected