Python has the nice help() built-in that displays the doc string of an object. When I use it in the REPL passing a function in my module it nicely displays:
>>> help(mymodule.myfunction)
Help on function myfunction in module mymodule.main:
myfunction(parameter=False) -> Dict[str, str]
Doc string of myfunction
But if I use a decorator like functools.@lru_cache the help function is somewhat confusing:
>>> help(mymodule.myfunction)
Help on _lru_cache_wrapper in module mymodule.main:
myfunction(parameter=False) -> Dict[str, str]
Doc string of myfunction
The doc string is displayed, but the first line of the message is confusing for my users who aren't experienced Python programmers.
Note that I didn't create the decorator, it is from the functools module in stdlib. It looks like the solution of using functools.wraps won't work for me.
Can I do something to force the display of the first message even if the function has a decorator?