[docs] [issue19342] Improve grp module docstrings

Marius Gedminas report at bugs.python.org
Tue Oct 22 10:58:23 CEST 2013


New submission from Marius Gedminas:

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,
                            pw_gid,pw_gecos,pw_dir,pw_shell)
        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.

----------
assignee: docs at python
components: Documentation
files: grpmodule-docstrings.patch
keywords: patch
messages: 200896
nosy: docs at python, mgedmin
priority: normal
severity: normal
status: open
title: Improve grp module docstrings
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32295/grpmodule-docstrings.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19342>
_______________________________________


More information about the docs mailing list