Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d80d5f4 commit bd87d08Copy full SHA for bd87d08
1 file changed
Lib/weakref.py
@@ -166,7 +166,7 @@ def values(self):
166
def popitem(self):
167
if self._pending_removals:
168
self._commit_removals()
169
- while 1:
+ while True:
170
key, wr = self.data.popitem()
171
o = wr()
172
if o is not None:
@@ -324,7 +324,7 @@ def __contains__(self, key):
324
try:
325
wr = ref(key)
326
except TypeError:
327
- return 0
+ return False
328
return wr in self.data
329
330
def items(self):
@@ -362,7 +362,7 @@ def keyrefs(self):
362
return list(self.data)
363
364
365
366
key, value = self.data.popitem()
367
o = key()
368
0 commit comments