◐ Shell
clean mode source ↗

Message 194228 - Python tracker

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.