python自定义注解
1 def print_log_before_action(fn): 2 def print_log(*arg): 3 print("before execute fn") 4 return fn(*arg) 5 6 return print_log 7 8 9 @print_log_before_action 10 def print_hello(name: str): 11 print("hello python: " + name) 12 13 14 if __name__ == '__main__': 15 # print("test") 16 print_hello("guanxianseng")
Please call me JiangYouDang!
浙公网安备 33010602011771号