[issue29940] Add follow_wrapped=True option to help()

2020-09-25 Thread Tal Einat
Tal Einat added the comment: The issue was not that __doc__ was not copied, but that help() would use the class's __doc__ when called on an instance, even if that instance had its own __doc__. See the StackOverflow question for another example. You will not see this issue with the latest ma

[issue29940] Add follow_wrapped=True option to help()

2020-09-25 Thread Emmanuel Arias
Emmanuel Arias added the comment: Hi @taleinat, Seems tha the wrapped func already has the __doc__ (in this case) copied. following your example: >>> double >>> double.__doc__ 'A function' so help(double) will print correctly the double doc. -- ___

[issue29940] Add follow_wrapped=True option to help()

2020-09-25 Thread Tal Einat
Tal Einat added the comment: 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: cl

[issue29940] Add follow_wrapped=True option to help()

2020-09-23 Thread Emmanuel Arias
Change by Emmanuel Arias : -- pull_requests: +21431 pull_request: https://github.com/python/cpython/pull/22390 ___ Python tracker ___ __

[issue29940] Add follow_wrapped=True option to help()

2019-04-22 Thread Emmanuel Arias
Change by Emmanuel Arias : -- keywords: +patch pull_requests: +12841 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue29940] Add follow_wrapped=True option to help()

2019-04-22 Thread Emmanuel Arias
Change by Emmanuel Arias : -- nosy: +eamanu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue29940] Add follow_wrapped=True option to help()

2019-04-22 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger versions: +Python 3.8 -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue29940] Add follow_wrapped=True option to help()

2017-03-29 Thread Samwyse
New submission from Samwyse: The help(obj) function uses the type of obj to create its result. This is less than helpful when requesting help on a wrapped object. Since 3.5, inspect.signature() and inspect.from_callable() have a follow_wrapped option to get around similar issues. Adding the