[Python-ideas] Deterministic iterator cleanup