0
How I can to decorate function with parameters? such as print_reverse(x)?
1 Resposta
+ 2
def decor(func):
def wrap(txt):
print("============")
func(txt)
print("============")
return wrap
@decor
def print_text(txt):
print(txt)
print_text("Hello World");
print_text("Goodbye world")
print_text("This might actually start to make sense...")