diff options
Diffstat (limited to 'Lib/_weakrefset.py')
-rw-r--r-- | Lib/_weakrefset.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/_weakrefset.py b/Lib/_weakrefset.py index 6a98b88e33..7f9923c634 100644 --- a/Lib/_weakrefset.py +++ b/Lib/_weakrefset.py @@ -60,6 +60,8 @@ class WeakSet: 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): |