On Sat, Jul 2, 2016 at 12:40 AM, Lawrence D’Oliveiro <lawrenced...@gmail.com> wrote: > On Saturday, July 2, 2016 at 5:10:06 PM UTC+12, Ian wrote: >> You should use functools.wraps instead of clobbering the decorated >> function's name and docstring: > > Where am I doing that?
Using the implementation you posted: >>> @decorator_with_args ... def my_decorator(func, *args, **kwargs): ... """Returns func unmodified.""" ... return func ... >>> my_decorator.__doc__ 'generates a decorator which applies my_decorator to the given arguments' -- https://mail.python.org/mailman/listinfo/python-list