DECROMAX

Standard decorator

Jun 21st, 2022
1,033
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. # decorator that adds ten
  2. def add_num(func):
  3.     @wraps(func)
  4.     def inner(*args, **kwargs):
  5.         add_ten = func(*args, **kwargs) + 10
  6.         return add_ten
  7.  
  8.     return inner
Advertisement
Add Comment
Please, Sign In to add comment