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: Add docstrings to selected named tuples
Type: Stage: resolved
Components: Documentation Versions: Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, petr.viktorin, python-dev, rhettinger
Priority: low Keywords: patch

Created on 2015-08-17 04:28 by rhettinger, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
ntdoc.diff rhettinger, 2015-08-17 04:28 review
ntdoc2.diff rhettinger, 2015-08-17 18:08 Updated to not subclass SelectorKey. review
Messages (6)
msg248712 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2015-08-17 04:28
Add docstrings to some named tuples that could benefit from it (there was more documentation or useful information other than just the field name).  This makes the help() on those named tuples much more informative.
msg248713 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2015-08-17 04:32
For example:

>>> import sched
>>> help(sched.Event)

class Event(Event)
 |  Event(time, priority, action, argument, kwargs)
 | 
...
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from Event:
 |  
 |  action
 |      Executing the event means executing
 |      action(*argument, **kwargs)
 |  
 |  argument
 |      argument is a sequence holding the positional
 |      arguments for the action.
 |  
 |  kwargs
 |      kwargs is a dictionary holding the keyword
 |      arguments for the action.
 |  
 |  priority
 |      Events scheduled for the same time will be executed
 |      in the order of their priority.
 |  
 |  time
 |      Numeric type compatible with the return value of the
 |      timefunc function passed to the constructor.
msg248757 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-08-18 05:04
New changeset 40f2bbb922e6 by Raymond Hettinger in branch 'default':
Issue #24878:  Add docstrings to selected namedtuples
https://hg.python.org/cpython/rev/40f2bbb922e6
msg248768 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2015-08-18 10:17
I see some typos in aifc.py:
+_aifc_params.sampwidth.__doc__ = 'Ample width in bytes'
+_aifc_params.compname.__doc__ = ("""A human-readable version ofcompression type

Should that be "Sample width" and "of compression"?
msg249015 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-08-23 18:28
New changeset 4432c441b639 by Raymond Hettinger in branch 'default':
Issue #24878: Fix typos and line wrap
https://hg.python.org/cpython/rev/4432c441b639
msg249016 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2015-08-23 18:28
Thanks Petr
History
Date User Action Args
2022-04-11 14:58:19adminsetgithub: 69066
2015-08-23 18:28:24rhettingersetmessages: + msg249016
2015-08-23 18:28:10python-devsetmessages: + msg249015
2015-08-18 10:17:36petr.viktorinsetnosy: + petr.viktorin
messages: + msg248768
2015-08-18 05:05:16rhettingersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2015-08-18 05:04:54python-devsetnosy: + python-dev
messages: + msg248757
2015-08-17 18:08:36rhettingersetfiles: + ntdoc2.diff
2015-08-17 04:32:47rhettingersetmessages: + msg248713
2015-08-17 04:28:58rhettingercreate