summaryrefslogtreecommitdiffstats
path: root/Lib/_weakrefset.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-12-17 23:28:36 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-12-17 23:28:36 (GMT)
commitbd4b667ea4003647477a136e0b677e943af795a2 (patch)
tree4319b1990214fa5f3b5db1a7c33d1a962f7c3c79 /Lib/_weakrefset.py
parentc97f5ede8f15ab91b2bc224d6fd7c577b744af63 (diff)
downloadcpython-bd4b667ea4003647477a136e0b677e943af795a2.zip
cpython-bd4b667ea4003647477a136e0b677e943af795a2.tar.gz
cpython-bd4b667ea4003647477a136e0b677e943af795a2.tar.bz2
Issue #20006: Fix sporadic failures in test_weakset.
Diffstat (limited to 'Lib/_weakrefset.py')
-rw-r--r--Lib/_weakrefset.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/_weakrefset.py b/Lib/_weakrefset.py
index 990c3a6..627959b 100644
--- a/Lib/_weakrefset.py
+++ b/Lib/_weakrefset.py
@@ -60,6 +60,8 @@ class WeakSet(object):
for itemref in self.data:
item = itemref()
if item is not None:
+ # Caveat: the iterator will keep a strong reference to
+ # `item` until it is resumed or closed.
yield item
def __len__(self):