Commits

Antoine Pitrou  committed f189da5

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

  • Participants
  • Parent commits 63502dd
  • Branches 3.2

Comments (0)

Files changed (1)

File Lib/test/test_weakset.py

             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