This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author taleinat
Recipients eamanu, rhettinger, samwyse, taleinat
Date 2020-09-25.19:14:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
To clarify, to my understanding the issue here is that when using a class as a decorator, and copying the wrapped function's __doc__ to self.__doc__ in __init__, help() will pick up the wrapper class's __doc__ rather than the instance's __doc__.

For example:

class Deco:
    "A decorator."
    def __init__(self, func):
        functools.update_wrapper(self, func)
    def __call__(self, *args, **kwargs):

def double(n):
    "A function."
    return n * 2

help(double) will show "A decorator." rather than "A function." despite the use of functools.update_wrapper().
Date User Action Args
2020-09-25 19:14:22taleinatsetrecipients: + taleinat, rhettinger, samwyse, eamanu
2020-09-25 19:14:22taleinatsetmessageid: <>
2020-09-25 19:14:22taleinatlinkissue29940 messages
2020-09-25 19:14:22taleinatcreate