In module functools
of bibliotaca padrão
of Python
there are two functions update_wrapper
and wraps
in the documentation of function wraps
we have:
This is a convenience function for invoking
update_wrapper()
as a function decorator when defining a wrapper function. It is equivalent topartial(update_wrapper, wrapped=wrapped, assigned=assigned, updated=updated)
.
I know that the update_wrapper
function is internally called by wraps
, I would like an example where you need to use the update_wrapper
function and not wraps
.