Skip to content

gh-153305: Fix dbm.whichdb docstring return-value example#153306

Open
tonghuaroot wants to merge 2 commits into
python:mainfrom
tonghuaroot:fix-dbm-whichdb-docstring
Open

gh-153305: Fix dbm.whichdb docstring return-value example#153306
tonghuaroot wants to merge 2 commits into
python:mainfrom
tonghuaroot:fix-dbm-whichdb-docstring

Conversation

@tonghuaroot

@tonghuaroot tonghuaroot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

dbm.whichdb() returns the dotted submodule name ("dbm.ndbm", "dbm.gnu",
"dbm.sqlite3", "dbm.dumb"), matching the keys of the internal dispatch
table and the values already documented in Doc/library/dbm.rst. The
docstring example still used the pre-package "ndbm" / "gnu" form. This
corrects the example only.

Documentation-only change; no behavior change and no test needed.

whichdb() returns the dotted submodule name, such as "dbm.ndbm" or
"dbm.gnu", matching the keys of the internal dispatch table and the
values documented in Doc/library/dbm.rst.  The docstring still showed
the pre-package "ndbm"/"gnu" form.  Correct the example.
Comment thread Lib/dbm/__init__.py Outdated
Comment on lines +105 to +106
- the name of the dbm submodule (e.g. "dbm.ndbm" or "dbm.gnu") if
recognized.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- the name of the dbm submodule (e.g. "dbm.ndbm" or "dbm.gnu") if
recognized.
- the name of the dbm submodule (for example "dbm.ndbm" or "dbm.gnu")
if recognized.

While we're here, let's update this to be compliant with our style guide.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants