def wai(x):
def nei(name='员工'):
if name == '员工':
x()
else:
print("只能本公司的人能查看")
return nei
@wai
def f1():
print("f1")
def f2():
print("f2")
def f3():
print("f3")
def f4():
print("f4")
f1()
f2()
def wai(x):
def nei(name='员工'):
if name == '员工':
x()
else:
print("只能本公司的人能查看")
return nei
@wai
def f1():
print("f1")
def f2():
print("f2")
def f3():
print("f3")
def f4():
print("f4")
f1()
f2()
本文标题:简单的了解下装饰器的基本操作
本文链接:https://www.haomeiwen.com/subject/abamyftx.html
网友评论