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.

Title: Improve grp module docstrings
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: BreamoreBoy, docs@python, georg.brandl, mgedmin, python-dev
Priority: normal Keywords: patch

Created on 2013-10-22 08:58 by mgedmin, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
grpmodule-docstrings.patch mgedmin, 2013-10-22 08:58 patch review
Messages (5)
msg200896 - (view) Author: Marius Gedminas (mgedmin) * Date: 2013-10-22 08:58
This patch gives grp.getgrnam and grp.getgrgid sligtly more useful docstrings, and brings them in line with pwd.getpwnam/pwd.getpwuid.

Compare pydoc pwd.getpwnam:

    pwd.getpwnam = getpwnam(...)
        getpwnam(name) -> (pw_name,pw_passwd,pw_uid,
        Return the password database entry for the given user name.
        See help(pwd) for more on password database entries.

After looking at it I know that I can convert a name to an UID by doing pwd.getpwnam(name).pw_uid.

Meanwhile pydoc grp.getgrnam:

    grp.getgrnam = getgrnam(...)
        getgrnam(name) -> tuple
        Return the group database entry for the given group name.  If
        name is not valid, raise KeyError.

is rather unfriendly and makes me reach for Google just so that I could find out the names of the namedtuple members.
msg228148 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-10-02 01:00
The patch only changes six lines.  At a quick glance it seems fine to me so can we have a formal review please.
msg228162 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2014-10-02 06:32
msg228163 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-10-02 06:35
New changeset e2b757baaef1 by Georg Brandl in branch '3.4':
Closes #19342: improve docstrings in grp module.
msg228164 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-10-02 06:37
New changeset de0ca868d44f by Georg Brandl in branch '2.7':
Closes #19342: improve docstrings in grp module.
Date User Action Args
2022-04-11 14:57:52adminsetgithub: 63541
2014-10-02 06:37:01python-devsetmessages: + msg228164
2014-10-02 06:35:40python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg228163

resolution: fixed
stage: resolved
2014-10-02 06:32:13georg.brandlsetnosy: + georg.brandl
messages: + msg228162
2014-10-02 01:00:41BreamoreBoysetnosy: + BreamoreBoy
messages: + msg228148
2013-10-22 08:58:23mgedmincreate