I use a flask, and some functions have decorators to check for some headers and return some error codes if they are missing.
In these decorators, before I return the decorated function, I do something like
decorated_function.__doc__ += "Returns 400 if the X-Version header is not present."
Is it a python? Is there a better way to achieve this?
I use wraps already from functools.
source
share