Commit 95a97b7c authored by Antoine Pitrou's avatar Antoine Pitrou

Delete the iterator, which could accidentally keep a temporary reference to the yielded element.

parent 9edceb3e
......@@ -335,6 +335,7 @@ class TestWeakSet(unittest.TestCase):
try:
it = iter(s)
next(it)
del it
# Schedule an item for removal and recreate it
u = ustr(str(items.pop()))
gc.collect() # just in case
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment