
Jan. 5, 2021
1:06 p.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