diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2021-08-31 13:59:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-31 13:59:52 (GMT) |
commit | 3c65457156d87e55010507d616b4eecb7a02883d (patch) | |
tree | a472bfd630afb07817c381852549f24bdfb9d01f /Modules | |
parent | 08767c73b5bf1f28792d5fef7f41d52822a4989f (diff) | |
download | cpython-3c65457156d87e55010507d616b4eecb7a02883d.zip cpython-3c65457156d87e55010507d616b4eecb7a02883d.tar.gz cpython-3c65457156d87e55010507d616b4eecb7a02883d.tar.bz2 |
bpo-45060: Get rid of few uses of the equality operators with None (GH-28087)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_gdbmmodule.c | 4 | ||||
-rw-r--r-- | Modules/clinic/_gdbmmodule.c.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_gdbmmodule.c b/Modules/_gdbmmodule.c index 8a8c6e7..3c9a0e9 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_t key_length) -/*[clinic end generated code: output=c81a69300ef41766 input=fcf6a51a96ce0172]*/ +/*[clinic end generated code: output=c81a69300ef41766 input=365e297bc0b3db48]*/ { PyObject *v; datum dbm_key, nextkey; diff --git a/Modules/clinic/_gdbmmodule.c.h b/Modules/clinic/_gdbmmodule.c.h index 0604451..15baf52 100644 --- a/Modules/clinic/_gdbmmodule.c.h +++ b/Modules/clinic/_gdbmmodule.c.h @@ -161,7 +161,7 @@ PyDoc_STRVAR(_gdbm_gdbm_nextkey__doc__, "to create a list in memory that contains them all:\n" "\n" " k = db.firstkey()\n" -" while k != None:\n" +" while k is not None:\n" " print(k)\n" " k = db.nextkey(k)"); @@ -340,4 +340,4 @@ skip_optional: exit: return return_value; } -/*[clinic end generated code: output=c3ee3ad64a2f331f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1fed9ed50ad23551 input=a9049054013a1b77]*/ |