commit | bd4b667ea4003647477a136e0b677e943af795a2 | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Wed Dec 18 00:28:36 2013 +0100 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Wed Dec 18 00:28:36 2013 +0100 |
tree | 4319b1990214fa5f3b5db1a7c33d1a962f7c3c79 | |
parent | c97f5ede8f15ab91b2bc224d6fd7c577b744af63 [diff] [blame] |
Issue #20006: Fix sporadic failures in test_weakset.
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 @@ 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):