[issue11798] Test cases not garbage collected after run
Terry J. Reedy
report at bugs.python.org
Sat Aug 3 03:56:20 CEST 2013
Terry J. Reedy added the comment:
If the iterator for 'self' were de-structive, if it removed (popped) the test from whatever structure holds it before yielding it, the messiness of enumerate and the new ._removeTestAtIndex method would not be needed and 'for test in self' would work as desired. If considered necessary, new method .pop_iter, used in 'for test in self.pop_iter', would make it obvious that the iteration empties the collection.
----------
nosy: +terry.reedy
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11798>
_______________________________________
More information about the Python-bugs-list
mailing list