Advertisement
sissou123

parameters in Python decorator function wrapper

Oct 30th, 2023
781
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | Source Code | 0 0
  1. Handle an error from flask decorator
  2. in python 3 you can just do: def error_handler_decorator (func): @functools.wraps (func) def wrapper (*args, error_message_for_wrapper = None, cont = True, **kwargs): try: return func (*args, **kwargs) except:
  3. https://cuty.io/nGDNcjAQ65o
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement