# -*- coding: utf-8 -*-
def print_result(func):
def wrapper(*args, **kwargs):
rc = func(*args, **kwargs)
print('function ' + func.__name__ + ' returns ' + repr(rc))
return rc
return wrapper
@print_result
def a(x=0):
return x, x*x
print('a(2) =', a(2))