projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d80d5f4
)
Use booleans.
author
Georg Brandl
<georg@python.org>
Fri, 3 Dec 2010 07:49:09 +0000
(07:49 +0000)
committer
Georg Brandl
<georg@python.org>
Fri, 3 Dec 2010 07:49:09 +0000
(07:49 +0000)
Lib/weakref.py
patch
|
blob
|
history
diff --git
a/Lib/weakref.py
b/Lib/weakref.py
index 66c4dc6ffbb7d5a6d3cb0c20657ac477ae2acce8..468f8f1029024b78ebdac2f543c5db78810f685d 100644
(file)
--- a/
Lib/weakref.py
+++ b/
Lib/weakref.py
@@
-166,7
+166,7
@@
class WeakValueDictionary(collections.MutableMapping):
def popitem(self):
if self._pending_removals:
self._commit_removals()
- while
1
:
+ while
True
:
key, wr = self.data.popitem()
o = wr()
if o is not None:
@@
-324,7
+324,7
@@
class WeakKeyDictionary(collections.MutableMapping):
try:
wr = ref(key)
except TypeError:
- return
0
+ return
False
return wr in self.data
def items(self):
@@
-362,7
+362,7
@@
class WeakKeyDictionary(collections.MutableMapping):
return list(self.data)
def popitem(self):
- while
1
:
+ while
True
:
key, value = self.data.popitem()
o = key()
if o is not None: