dbm.gnu and dbm.ndbm accept both strings and bytes as keys and values. For the
former they are converted to bytes before being written to the DB.

Closes issue 3799. Reviewed by Skip Montanaro.
diff --git a/Modules/_gdbmmodule.c b/Modules/_gdbmmodule.c
index 590ef21..c6817fe 100644
--- a/Modules/_gdbmmodule.c
+++ b/Modules/_gdbmmodule.c
@@ -142,7 +142,7 @@
 
     if (!PyArg_Parse(v, "s#", &krec.dptr, &krec.dsize) ) {
         PyErr_SetString(PyExc_TypeError,
-                        "gdbm mappings have string indices only");
+                        "gdbm mappings have bytes or string indices only");
         return -1;
     }
     if (dp->di_dbm == NULL) {
@@ -160,7 +160,7 @@
     else {
         if (!PyArg_Parse(w, "s#", &drec.dptr, &drec.dsize)) {
             PyErr_SetString(PyExc_TypeError,
-                            "gdbm mappings have byte string elements only");
+                            "gdbm mappings have byte or string elements only");
             return -1;
         }
         errno = 0;