Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/dabeaz/python-cookbook
/ wrapper
Function
wrapper
src/10/monkeypatching_modules_on_import/example2.py:7–9 ·
view source on GitHub ↗
(*args, **kwargs)
Source
from the content-addressed store, hash-verified
5
def
logged(func):
6
@wraps(func)
7
def
wrapper(*args, **kwargs):
8
print(
'Calling'
, func.__name__, args, kwargs)
9
return
func(*args, **kwargs)
10
return
wrapper
11
12
# Example
Callers
nothing calls this directly
Calls
1
func
Function · 0.50
Tested by
no test coverage detected