装饰器3decorator:包含参数传递
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 user, passwd = "Flagon", "123" 2 3 4 def auth(auth_type): 5 print('auth func:', auth_type) 6 def outer_wrapper(func): 7 def wrapper(*args, **lwargs): 8 print('wrapper func args:', *args, **lwargs) 9 user_name = input('username:').strip() 10 password = input('password:').strip() 11 if auth_type == 'local': 12 if user == user_name and passwd == password: 13 print('