Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docstrings to selected named tuples #69066

Closed
rhettinger opened this issue Aug 17, 2015 · 6 comments
Closed

Add docstrings to selected named tuples #69066

rhettinger opened this issue Aug 17, 2015 · 6 comments
Labels
docs Documentation in the Doc dir

Comments

@rhettinger
Copy link
Contributor

BPO 24878
Nosy @rhettinger, @encukou
Files
  • ntdoc.diff
  • ntdoc2.diff: Updated to not subclass SelectorKey.
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2015-08-18.05:05:16.086>
    created_at = <Date 2015-08-17.04:28:57.995>
    labels = ['docs']
    title = 'Add docstrings to selected named tuples'
    updated_at = <Date 2015-08-23.18:28:24.944>
    user = 'https://github.com/rhettinger'

    bugs.python.org fields:

    activity = <Date 2015-08-23.18:28:24.944>
    actor = 'rhettinger'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2015-08-18.05:05:16.086>
    closer = 'rhettinger'
    components = ['Documentation']
    creation = <Date 2015-08-17.04:28:57.995>
    creator = 'rhettinger'
    dependencies = []
    files = ['40193', '40197']
    hgrepos = []
    issue_num = 24878
    keywords = ['patch']
    message_count = 6.0
    messages = ['248712', '248713', '248757', '248768', '249015', '249016']
    nosy_count = 4.0
    nosy_names = ['rhettinger', 'petr.viktorin', 'docs@python', 'python-dev']
    pr_nums = []
    priority = 'low'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue24878'
    versions = ['Python 3.6']

    @rhettinger
    Copy link
    Contributor Author

    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.

    @rhettinger rhettinger added the docs Documentation in the Doc dir label Aug 17, 2015
    @rhettinger
    Copy link
    Contributor Author

    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.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Aug 18, 2015

    New changeset 40f2bbb922e6 by Raymond Hettinger in branch 'default':
    Issue bpo-24878: Add docstrings to selected namedtuples
    https://hg.python.org/cpython/rev/40f2bbb922e6

    @encukou
    Copy link
    Member

    encukou commented Aug 18, 2015

    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"?

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Aug 23, 2015

    New changeset 4432c441b639 by Raymond Hettinger in branch 'default':
    Issue bpo-24878: Fix typos and line wrap
    https://hg.python.org/cpython/rev/4432c441b639

    @rhettinger
    Copy link
    Contributor Author

    Thanks Petr

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants