[issue40257] Improve the use of __doc__ in pydoc

2021-11-04 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- components: +Library (Lib) -Interpreter Core nosy: +eamanu, gvanrossum, levkivskyi, lukasz.langa, mark.dickinson, mbussonn, ncoghlan, serhiy.storchaka, tcaswell, terry.reedy, veky, xtreak -ahmedsayeed1982 versions: +Python 3.9 -Python 3.6

[issue40257] Improve the use of __doc__ in pydoc

2021-11-04 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- Removed message: https://bugs.python.org/msg405706 ___ Python tracker ___ ___ Python-bugs-list

[issue40257] Improve the use of __doc__ in pydoc

2021-11-04 Thread Ahmed Sayeed
Ahmed Sayeed added the comment: <1>: Abbrev Number: 46 (DW_TAG_array_type) http://www.compilatori.com/travel/youtube/ DW_AT_data_location: 2 byte block: 97 6 (DW_OP_push_object_address; DW_OP_deref) http://www.acpirateradio.co.uk/travel/carbon-dioxide-emissions/ DW_AT_rank

[issue40257] Improve the use of __doc__ in pydoc

2020-09-26 Thread Emmanuel Arias
Change by Emmanuel Arias : -- nosy: +eamanu nosy_count: 11.0 -> 12.0 pull_requests: +21452 pull_request: https://github.com/python/cpython/pull/22390 ___ Python tracker ___

[issue40257] Improve the use of __doc__ in pydoc

2020-05-18 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: > Looks like the revert is solving the issue? It appears to do so as far as I can tell, and most test pass on nightly, the rest seem to be unrelated to changes in current 3.9. Many thanks to Serhiy for all the work on making documentation better, and

[issue40257] Improve the use of __doc__ in pydoc

2020-05-18 Thread Łukasz Langa
Łukasz Langa added the comment: Looks like the revert is solving the issue? -- priority: release blocker -> high ___ Python tracker ___

[issue40257] Improve the use of __doc__ in pydoc

2020-05-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 08b47c367a08f571a986366aa33828d3951fa88d by Serhiy Storchaka in branch 'master': bpo-40257: Revert changes to inspect.getdoc() (GH-20073) https://github.com/python/cpython/commit/08b47c367a08f571a986366aa33828d3951fa88d --

[issue40257] Improve the use of __doc__ in pydoc

2020-05-18 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40257] Improve the use of __doc__ in pydoc

2020-05-17 Thread Thomas Caswell
Change by Thomas Caswell : -- nosy: +tcaswell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40257] Improve the use of __doc__ in pydoc

2020-05-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Whether or not an object has a docstring is implementation defined, and I do not consider it to be part of its API. I just backported some new docstrings (with Brett Cannon's concurrence), and I would consider it OK for Serhiy to do the same with his

[issue40257] Improve the use of __doc__ in pydoc

2020-05-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +19379 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/20073 ___ Python tracker ___

[issue40257] Improve the use of __doc__ in pydoc

2020-05-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I can just copy the implementation of inspect.getdoc() and related functions in pydoc for use in help(), and restore the old code in the inspect module. Of course it will mean that third-party tools will continue to show incorrect docstrings in some

[issue40257] Improve the use of __doc__ in pydoc

2020-05-13 Thread Łukasz Langa
Łukasz Langa added the comment: OK, that was my intuition, too. I will block beta on it then. -- ___ Python tracker ___ ___

[issue40257] Improve the use of __doc__ in pydoc

2020-05-13 Thread Yury Selivanov
Change by Yury Selivanov : -- nosy: -yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40257] Improve the use of __doc__ in pydoc

2020-05-13 Thread Guido van Rossum
Guido van Rossum added the comment: I feel it should. At the very least, a decision should be made on how to move forward. -- ___ Python tracker ___

[issue40257] Improve the use of __doc__ in pydoc

2020-05-13 Thread Łukasz Langa
Łukasz Langa added the comment: Should this block 3.9.0b1, planned for Monday May 18th? -- nosy: +lukasz.langa ___ Python tracker ___

[issue40257] Improve the use of __doc__ in pydoc

2020-05-12 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: I've sent a request for comments on python-dev https://mail.python.org/archives/list/python-...@python.org/thread/6QO2XI5B7RVZDW3YZV24LYD75VGRITFU/ Thanks. -- ___ Python tracker

[issue40257] Improve the use of __doc__ in pydoc

2020-05-11 Thread Guido van Rossum
Guido van Rossum added the comment: I'm making this a release blocker -- please everybody come to an agreement or ask on python-dev. -- priority: normal -> release blocker resolution: fixed -> remind ___ Python tracker

[issue40257] Improve the use of __doc__ in pydoc

2020-05-11 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: > Can you all please decide which issue to use? We can stay here, I opened the other issue before figuring out this was the cause. > If IPython wants to output the help on the instance, it should change the > implementation of `?` and `??`. It would be

[issue40257] Improve the use of __doc__ in pydoc

2020-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: help(1) as well as help(int) output the help for int. The only difference is that the former has the first line "Help on int object:", and the latter -- "Help on class int in module builtins:". If IPython wants to output the help on the instance, it

[issue40257] Improve the use of __doc__ in pydoc

2020-05-10 Thread Guido van Rossum
Guido van Rossum added the comment: Can you all please decide which issue to use? -- ___ Python tracker ___ ___ Python-bugs-list

[issue40257] Improve the use of __doc__ in pydoc

2020-05-10 Thread Vedran Čačić
Vedran Čačić added the comment: Of course, I thought that 2. inspect.getdoc() returns the object's own docstring. means it returns the object's own docstring _if it has one_. If it doesn't, then it should still return the docstring of its class, of course! I have no problem with the fact

[issue40257] Improve the use of __doc__ in pydoc

2020-05-10 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: > can you clarify your example? What's load()? And what does df?? do? It was vague on purpose, `load()` would be for example `load_csv()` from `pandas` that return a `pandas.DataFrame`. The point being that users typically won't really know the type

[issue40257] Improve the use of __doc__ in pydoc

2020-05-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: https://bugs.python.org/issue40587 has been opened. Copy paste of the report as below : In python 3.8: ``` >>> class A(object): ... """standard docstring""" ... pass ... >>> import inspect >>> inspect.getdoc(A()) 'standard docstring' ```

[issue40257] Improve the use of __doc__ in pydoc

2020-05-10 Thread Guido van Rossum
Guido van Rossum added the comment: Okay, let's reopen. @Matthias, can you clarify your example? What's load()? And what does df?? do? -- status: closed -> open ___ Python tracker

[issue40257] Improve the use of __doc__ in pydoc

2020-05-10 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: This is going to potentially break a lot of interactive usage in the Scientific ecosystem. A a lot of people are going to do: df = load('my.csv') df?? To ask for help and will get nothing. Even for subclass, I want to argue that a docstring

[issue40257] Improve the use of __doc__ in pydoc

2020-05-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2fbc57af851814df567fb51054cb6f6a399f814a by Serhiy Storchaka in branch 'master': bpo-40257: Tweak docstrings for special generic aliases. (GH-20022) https://github.com/python/cpython/commit/2fbc57af851814df567fb51054cb6f6a399f814a

[issue40257] Improve the use of __doc__ in pydoc

2020-05-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +19333 pull_request: https://github.com/python/cpython/pull/20022 ___ Python tracker ___

[issue40257] Improve the use of __doc__ in pydoc

2020-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Some work is still needed for HTML output. But this code is so different from the code for plain text output and so complicated that I was afraid to break something. I'll rewrite it in separate issue. -- resolution: -> fixed stage: patch review

[issue40257] Improve the use of __doc__ in pydoc

2020-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7e64414f57b70dc5bc0ab19a3162a0735f9bfabf by Serhiy Storchaka in branch 'master': bpo-40257: Improve help for the typing module (GH-19546) https://github.com/python/cpython/commit/7e64414f57b70dc5bc0ab19a3162a0735f9bfabf --

[issue40257] Improve the use of __doc__ in pydoc

2020-04-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +18892 pull_request: https://github.com/python/cpython/pull/19546 ___ Python tracker ___

[issue40257] Improve the use of __doc__ in pydoc

2020-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset fbf2786c4c89430e2067016603078cf3500cfe94 by Serhiy Storchaka in branch 'master': bpo-40257: Output object's own docstring in pydoc (GH-19479) https://github.com/python/cpython/commit/fbf2786c4c89430e2067016603078cf3500cfe94 --

[issue40257] Improve the use of __doc__ in pydoc

2020-04-14 Thread Vedran Čačić
Vedran Čačić added the comment: Then I'm fine with it. Thanks. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40257] Improve the use of __doc__ in pydoc

2020-04-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, of course. And if it overrides some methods, but do not specify doctrings for new methods, they will be inherited from the parent class. class A: """Base class""" def foo(self): """Some docstring""" def bar(self): """Other docstring"""

[issue40257] Improve the use of __doc__ in pydoc

2020-04-14 Thread Vedran Čačić
Vedran Čačić added the comment: Ok, I get what you're saying. But if someone writes class B(A): # no docstring at all ... help(B) they'll still get other elements of current help? Particularly, "Methods inherited from A" (with their docstrings)? --

[issue40257] Improve the use of __doc__ in pydoc

2020-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Inheritance of docstrings was added in issue15582. It works good for class members, but I now realized that doing it for class itself was a mistake. For example: >>> import wave >>> help(wave.Error) Help on class Error in module wave: class

[issue40257] Improve the use of __doc__ in pydoc

2020-04-12 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: FWIW I like the idea. There are many objects in typing module that are not classes, it would be great to display docs for them. -- ___ Python tracker

[issue40257] Improve the use of __doc__ in pydoc

2020-04-11 Thread Vedran Čačić
Vedran Čačić added the comment: I don't agree with 1. I use that feature a lot, I write a base class which my students must subclass to their liking, but they still expect that help(TheirClass) will give them the documentation they need. I agree that in _some_ cases it is not helpful (but

[issue40257] Improve the use of __doc__ in pydoc

2020-04-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +18833 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19479 ___ Python tracker

[issue40257] Improve the use of __doc__ in pydoc

2020-04-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently pydoc outputs __doc__ for classes, functions, methods, properties, etc (using inspect.getdoc()). If the object itself does not have non-empty __doc__, it searches non-empty __doc__ in the class parenthesis (if the object is a class) or in the