python
def print_fin(func):
def wrapper(*args, **kwargs):
output = func(*args, **kwargs)
print(f'FIN {func.__name__}')
return output
return wrapper
使い方:
python
@print_fin
def greet():
print('Hello!')
greet()
結果
Hello!
FIN greet