CSS Ribbon

Reproducing the GitHub Ribbon in CSS

验证功能装饰器

def auth_func(func):
def wrapper(*args,**kwargs):
username = input('用户名:').strip()
password = input('密码:').strip()
if username =='pandaboy' and password =='123456':
res = func(*args,**kwargs)
return res
else:
print('用户名或密码错误')
return wrapper
# func(*args,**kwargs)

posted on 2018-02-23 16:30  pandaboy1123  阅读(159)  评论(0编辑  收藏  举报

导航