mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
#2503 make singletons compared with "is" not == or !=
Thanks to Wummel for the patch
This commit is contained in:
parent
672fbf5195
commit
5b63acd31e
54 changed files with 140 additions and 141 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue