1nikitas

Untitled

Mar 5th, 2022
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. def check_password(password):
  2.     def check1(func):
  3.         def check2(*args, **kwargs):
  4.             if input('пароль: ') != password:
  5.                 print('неверный пароль')
  6.                 return
  7.             return func(*args, **kwargs)
  8.         return check2
  9.     return check1
  10.  
  11.  
  12. @check_password('password')
  13. def make_burger(typeOfMeat, withOnion=False, withTomato=True):
  14.     print('make_burger')
  15.    
  16.    
  17. make_burger(1)
Add Comment
Please, Sign In to add comment