https://github.com/python/cpython/commit/4545845d7add274bd32d4fe706532524681bc380 commit: 4545845d7add274bd32d4fe706532524681bc380 branch: 3.12 author: Miss Islington (bot) <[email protected]> committer: erlend-aasland <[email protected]> date: 2024-01-26T12:42:31Z summary:
[3.12] Docs: fix versionchanged directives for dbm.open() and dbm.whichdb() (GH-114594) (#114595) (cherry picked from commit 8710faeac28e65c65862359413e8341492f529af) Co-authored-by: Erlend E. Aasland <[email protected]> files: M Doc/library/dbm.rst diff --git a/Doc/library/dbm.rst b/Doc/library/dbm.rst index 11120e704b7596..f9995982698b21 100644 --- a/Doc/library/dbm.rst +++ b/Doc/library/dbm.rst @@ -34,8 +34,8 @@ the Oracle Berkeley DB. * the empty string (``''``) if the file's format can't be guessed * a string containing the required module name, such as ``'dbm.ndbm'`` or ``'dbm.gnu'`` -.. versionchanged:: 3.11 - Accepts :term:`path-like object` for filename. + .. versionchanged:: 3.11 + *filename* accepts a :term:`path-like object`. .. Substitutions for the open() flag param docs; all submodules use the same text. @@ -74,6 +74,9 @@ the Oracle Berkeley DB. database has to be created. It defaults to octal ``0o666`` (and will be modified by the prevailing umask). + .. versionchanged:: 3.11 + *file* accepts a :term:`path-like object`. + The object returned by :func:`open` supports the same basic functionality as a :class:`dict`; keys and their corresponding values can be stored, retrieved, and @@ -87,9 +90,6 @@ available, as well as :meth:`!get` and :meth:`!setdefault`. Deleting a key from a read-only database raises database module specific error instead of :exc:`KeyError`. -.. versionchanged:: 3.11 - Accepts :term:`path-like object` for file. - Key and values are always stored as :class:`bytes`. This means that when strings are used they are implicitly converted to the default encoding before being stored. _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
