![](https://secure.gravatar.com/avatar/fd896d57302e86373a27c2443bd8e95a.jpg?s=120&d=mm&r=g)
5 Jan
2021
5 Jan
'21
6:06 a.m.
Hi Paul,
Per PEP 525, I can call aclose coroutine method to cleanup the generator, but it requires the code iterating to be aware that that closing the generator is necessary.
How about treating this as a bug for the specific use case that you mentioned, rather than a complete addition of " PEP 533 -- Deterministic cleanup for iterators". I am not certain why PEP 533 was deffered. I'd also suggest a documentation update if the details of aclose requirement is mentioned only in a PEP and not in the documentation. Thank you, Senthil