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.

classification
Title: Improve the way abstract base classes are shown in help()
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.9, Python 3.8
process
Status: closed Resolution: postponed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: benedwards14, eric.araujo, jacksonriley, michaelanckaert, pconnell, rhettinger
Priority: normal Keywords: newcomer friendly, patch

Created on 2013-02-27 02:29 by rhettinger, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
abc_class_level.diff jacksonriley, 2019-11-12 15:02
Pull Requests
URL Status Linked Edit
PR 17278 closed jacksonriley, 2019-11-20 09:36
Messages (8)
msg183107 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2013-02-27 02:29
Start by adding docstrings to the colletions ABCs.
Look at improving help() to clearly show the required abstract methods.
msg350170 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-08-22 07:20
There is just a little more work to do on this.

1) The class level docstrings needs to display which methods are required.  Sequence.__doc__ already does a good job of this but most of the other classes are missing docstrings or don't specific the needed methods.

2) Methods like Sequence.count and Mapping.__eq__ already have a good docstrings but there is nothing for most of the other methods.  The docstring should be modeled on that for the corresponding methods in the concrete classes (list.__getitem__ for example).
msg350199 - (view) Author: Michael Anckaert (michaelanckaert) * Date: 2019-08-22 15:42
I would be very interested and motivated to work on this. I'll start by taking a look at the pointers Raymond gave. If anyone can chime in with some more information / guidance that would be awesome.
msg355467 - (view) Author: Benjamin Edwards (benedwards14) * Date: 2019-10-27 13:27
Michael are you still interested in doing this, if not can I take it on?
msg356422 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-11-12 07:40
Benjamin, are you still interested in working on this?
msg356427 - (view) Author: Jackson Riley (jacksonriley) * Date: 2019-11-12 09:23
Hi Raymond,

I'm working with Ben on the EnHackathon project (https://enhackathon.github.io/) and am planning on working on this issue. Is that alright? Please do say if there's anything extra wanted or if you have any guidance (this is my first time contributing to python).
msg356467 - (view) Author: Jackson Riley (jacksonriley) * Date: 2019-11-12 15:02
Hi Raymond - here's a first attempt at adding class-level docstrings, based off the format of Sequence.__doc__. Apologies if some things are not well worded etc.

It looks like all of the non-magic methods have docstrings already but if you think the magic methods need docstrings then I will add them.
msg390132 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2021-04-03 17:42
Closing this due to lack of interest.
History
Date User Action Args
2022-04-11 14:57:42adminsetgithub: 61508
2021-04-03 17:42:34rhettingersetstatus: open -> closed
resolution: postponed
messages: + msg390132

stage: patch review -> resolved
2019-11-20 09:36:04jacksonrileysetstage: patch review
pull_requests: + pull_request16771
2019-11-12 15:02:49jacksonrileysetfiles: + abc_class_level.diff
keywords: + patch
messages: + msg356467
2019-11-12 09:23:36jacksonrileysetnosy: + jacksonriley
messages: + msg356427
2019-11-12 07:40:00rhettingersetmessages: + msg356422
2019-10-27 13:27:15benedwards14setnosy: + benedwards14
messages: + msg355467
2019-08-22 15:42:02michaelanckaertsetnosy: + michaelanckaert
messages: + msg350199
2019-08-22 07:20:06rhettingersetkeywords: + newcomer friendly

messages: + msg350170
versions: + Python 3.8, Python 3.9, - Python 3.5
2015-02-12 12:29:12BreamoreBoysetversions: + Python 3.5, - Python 3.4
2013-04-19 19:37:02pconnellsetnosy: + pconnell
2013-03-01 18:41:15eric.araujosetnosy: + eric.araujo

versions: + Python 3.4, - Python 2.7
2013-02-27 02:29:09rhettingercreate