When using the
@memoize() decorator, the original function's doc string has been stepped on/replaced by the
Memorizer classes' docstring.
In : from remember.memoize import memoize In : @memoize() ...: def test(a, b): ...: """example docstring""" ...: pass ...: In : help(test) In : test.__doc__ Out: "Memoize a callable's values.\n\n ``Memoizer`` is mainly meant for internal use. To memoize a callable,\n use the :func:`memoize` function.\n \n "
python has a way to deal with this in functools; it has a magic method called
wraps which can help with the passthrough of the original function name and docstring.