[3.10] bpo-45060: Get rid of few uses of the equality operators with None (GH-28087). (GH-28092)

(cherry picked from commit 3c65457156d87e55010507d616b4eecb7a02883d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
diff --git a/Modules/_gdbmmodule.c b/Modules/_gdbmmodule.c
index 6ca3ed6..a7fb6a3 100644
--- a/Modules/_gdbmmodule.c
+++ b/Modules/_gdbmmodule.c
@@ -450,7 +450,7 @@ The following code prints every key in the database db, without having
 to create a list in memory that contains them all:
 
       k = db.firstkey()
-      while k != None:
+      while k is not None:
           print(k)
           k = db.nextkey(k)
 [clinic start generated code]*/
@@ -458,7 +458,7 @@ to create a list in memory that contains them all:
 static PyObject *
 _gdbm_gdbm_nextkey_impl(gdbmobject *self, PyTypeObject *cls, const char *key,
                         Py_ssize_clean_t key_length)
-/*[clinic end generated code: output=204964441fdbaf02 input=fcf6a51a96ce0172]*/
+/*[clinic end generated code: output=204964441fdbaf02 input=365e297bc0b3db48]*/
 {
     PyObject *v;
     datum dbm_key, nextkey;