diff options
Diffstat (limited to 'Lib/bsddb')
-rw-r--r-- | Lib/bsddb/dbshelve.py | 6 | ||||
-rw-r--r-- | Lib/bsddb/test/test_basics.py | 4 | ||||
-rw-r--r-- | Lib/bsddb/test/test_dbtables.py | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/Lib/bsddb/dbshelve.py b/Lib/bsddb/dbshelve.py index f5f8b9a..96f604a 100644 --- a/Lib/bsddb/dbshelve.py +++ b/Lib/bsddb/dbshelve.py @@ -133,7 +133,7 @@ class DBShelf(DictMixin): def keys(self, txn=None): - if txn != None: + if txn is not None: return self.db.keys(txn) else: return self.db.keys() @@ -157,7 +157,7 @@ class DBShelf(DictMixin): def items(self, txn=None): - if txn != None: + if txn is not None: items = self.db.items(txn) else: items = self.db.items() @@ -168,7 +168,7 @@ class DBShelf(DictMixin): return newitems def values(self, txn=None): - if txn != None: + if txn is not None: values = self.db.values(txn) else: values = self.db.values() diff --git a/Lib/bsddb/test/test_basics.py b/Lib/bsddb/test/test_basics.py index de935f7..9b38d57 100644 --- a/Lib/bsddb/test/test_basics.py +++ b/Lib/bsddb/test/test_basics.py @@ -363,7 +363,7 @@ class BasicTestCase(unittest.TestCase): else: if set_raises_error: self.fail("expected exception") - if n != None: + if n is not None: self.fail("expected None: %r" % (n,)) rec = c.get_both('0404', self.makeData('0404')) @@ -377,7 +377,7 @@ class BasicTestCase(unittest.TestCase): else: if get_raises_error: self.fail("expected exception") - if n != None: + if n is not None: self.fail("expected None: %r" % (n,)) if self.d.get_type() == db.DB_BTREE: diff --git a/Lib/bsddb/test/test_dbtables.py b/Lib/bsddb/test/test_dbtables.py index 46602ce..faddd11 100644 --- a/Lib/bsddb/test/test_dbtables.py +++ b/Lib/bsddb/test/test_dbtables.py @@ -323,7 +323,7 @@ class TableDBTestCase(unittest.TestCase): self.tdb.Insert(tabname, {'Type': 'Unknown', 'Access': '0'}) def set_type(type): - if type == None: + if type is None: return 'MP3' return type |