diff options
| author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-02-02 15:57:45 (GMT) |
|---|---|---|
| committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-02-02 15:57:45 (GMT) |
| commit | 8d3f130d41d0c3f437f37a18c624955ce8bf65d3 (patch) | |
| tree | 84d89632ffbc9d3195d4cb43f5d99e782530e6db /Lib/bsddb/dbtables.py | |
| parent | 0ac4d4c82df9c2d629dee9cd388e84b7f08d25fe (diff) | |
| download | cpython-8d3f130d41d0c3f437f37a18c624955ce8bf65d3.zip cpython-8d3f130d41d0c3f437f37a18c624955ce8bf65d3.tar.gz cpython-8d3f130d41d0c3f437f37a18c624955ce8bf65d3.tar.bz2 | |
Fix idioms and a couple of py3k warnings. Patch by Florent Xicluna.
Diffstat (limited to 'Lib/bsddb/dbtables.py')
| -rw-r--r-- | Lib/bsddb/dbtables.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/bsddb/dbtables.py b/Lib/bsddb/dbtables.py index b728570..02ddcdc 100644 --- a/Lib/bsddb/dbtables.py +++ b/Lib/bsddb/dbtables.py @@ -179,14 +179,14 @@ class bsdTableDB : def set_range(self, search) : v = self._dbcursor.set_range(bytes(search, "iso8859-1")) - if v != None : + if v is not None : v = (v[0].decode("iso8859-1"), v[1].decode("iso8859-1")) return v def __next__(self) : v = getattr(self._dbcursor, "next")() - if v != None : + if v is not None : v = (v[0].decode("iso8859-1"), v[1].decode("iso8859-1")) return v @@ -204,7 +204,7 @@ class bsdTableDB : def put(self, key, value, flags=0, txn=None) : key = bytes(key, "iso8859-1") - if value != None : + if value is not None : value = bytes(value, "iso8859-1") return self._db.put(key, value, flags=flags, txn=txn) @@ -215,7 +215,7 @@ class bsdTableDB : def get(self, key, txn=None, flags=0) : key = bytes(key, "iso8859-1") v = self._db.get(key, txn=txn, flags=flags) - if v != None : + if v is not None : v = v.decode("iso8859-1") return v @@ -540,7 +540,7 @@ class bsdTableDB : # error dataitem = None dataitem = mappings[column](dataitem) - if dataitem != None: + if dataitem is not None: self.db.put( _data_key(table, column, rowid), dataitem, txn=txn) |
