spacepaste
new
Paste details
reply
|
raw
def
wrapper
(
func
):
def
wrapped
(
*
args
,
**
kwargs
):
print
"Calling func with
%s
,
%s
"
%
(
args
,
kwargs
)
return
func
(
*
args
,
**
kwargs
)
return
wrapped
@wrapper
def
multiply
(
x
,
y
=
2
):
return
2
*
x
*
y
print
multiply
(
44
)
print
multiply
(
55
,
y
=
22
)