标签:imp blog port style turn logs nal pre 输出
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import time
def foo(func):
def inner():
print(‘fs...‘)
func()
print(‘finally...‘)
return inner
@foo #f1 = foo(f1)==inner
def f1():
time.sleep(1)
print(‘f1....‘)
f1()
输出结果:
fs...
f1....
finally...
标签:imp blog port style turn logs nal pre 输出
原文地址:http://www.cnblogs.com/shanhua-fu/p/7641400.html