Skip to content

Commit 81e140d

Browse files
Docs: reword sentences about dbm submodule traits (#114609)
Don't repeatedly say that keys and values are coerced into bytes.
1 parent bb791c7 commit 81e140d

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

Doc/library/dbm.rst

+6-14
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,6 @@ The :mod:`dbm.gnu` module provides an interface to the :abbr:`GDBM (GNU dbm)`
205205
library, similar to the :mod:`dbm.ndbm` module, but with additional
206206
functionality like crash tolerance.
207207

208-
:class:`!gdbm` objects behave similar to :term:`mappings <mapping>`,
209-
except that keys and values are always converted to :class:`bytes` before storing,
210-
and the :meth:`!items` and :meth:`!values` methods are not supported.
211-
212208
.. note:: |incompat_note|
213209

214210
.. exception:: error
@@ -256,8 +252,9 @@ and the :meth:`!items` and :meth:`!values` methods are not supported.
256252

257253
A string of characters the *flag* parameter of :meth:`~dbm.gnu.open` supports.
258254

259-
In addition to the dictionary-like methods, :class:`gdbm` objects have the
260-
following methods and attributes:
255+
:class:`!gdbm` objects behave similar to :term:`mappings <mapping>`,
256+
but :meth:`!items` and :meth:`!values` methods are not supported.
257+
The following methods are also provided:
261258

262259
.. method:: gdbm.firstkey()
263260

@@ -314,10 +311,6 @@ and the :meth:`!items` and :meth:`!values` methods are not supported.
314311

315312
The :mod:`dbm.ndbm` module provides an interface to the
316313
:abbr:`NDBM (New Database Manager)` library.
317-
:class:`!ndbm` objects behave similar to :term:`mappings <mapping>`,
318-
except that keys and values are always stored as :class:`bytes`,
319-
and the :meth:`!items` and :meth:`!values` methods are not supported.
320-
321314
This module can be used with the "classic" NDBM interface or the
322315
:abbr:`GDBM (GNU dbm)` compatibility interface.
323316

@@ -359,8 +352,9 @@ This module can be used with the "classic" NDBM interface or the
359352
:param int mode:
360353
|mode_param_doc|
361354

362-
In addition to the dictionary-like methods, :class:`!ndbm` objects
363-
provide the following method:
355+
:class:`!ndbm` objects behave similar to :term:`mappings <mapping>`,
356+
but :meth:`!items` and :meth:`!values` methods are not supported.
357+
The following methods are also provided:
364358

365359
.. versionchanged:: 3.11
366360
Accepts :term:`path-like object` for filename.
@@ -399,8 +393,6 @@ The :mod:`dbm.dumb` module provides a persistent :class:`dict`-like
399393
interface which is written entirely in Python.
400394
Unlike other :mod:`dbm` backends, such as :mod:`dbm.gnu`, no
401395
external library is required.
402-
As with other :mod:`dbm` backends,
403-
the keys and values are always stored as :class:`bytes`.
404396

405397
The :mod:`!dbm.dumb` module defines the following:
406398

0 commit comments

Comments
 (0)