Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. def handler(stringa):
  2.     def decorator(func):
  3.         def funzione(*args, **kwargs):
  4.             # faccio cose
  5.             valore = func(*args, **kwargs)
  6.             # oppure
  7.             func(*args, **kwargs) # e basta
  8.             # posso fare altre cose dopo
  9.  
  10.         return funzione
  11.     return decorator
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement