File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,8 +99,13 @@ The :meth:`!keys` method returns a list instead of a view object.
9999The :meth: `!setdefault ` method requires two arguments.
100100
101101Key and values are always stored as :class: `bytes `. This means that when
102- strings are used they are implicitly converted to the default encoding before
103- being stored.
102+ strings are used they are implicitly converted to bytes before being stored.
103+ The specific encoding used for this conversion is backend-dependent and may
104+ vary between different dbm implementations and systems. The encoding choice
105+ is determined by the underlying database implementation. For consistent
106+ behavior across different backends and to maintain control over the encoding
107+ process, it is strongly recommended to explicitly convert strings to bytes
108+ using a specific encoding before storing them.
104109
105110These objects also support being used in a :keyword: `with ` statement, which
106111will automatically close them when done.
You can’t perform that action at this time.
0 commit comments