STINNER Victor added the comment:

> del gen  # Like deleting a plain iterator; no ResourceWarning expected

Hum, wait, I'm not sure that I got the whole point of this issue.

If the generator uses "with obj:", "del gen" will not call obj.__exit__().

Do you consider that "del gen" is better to clear obj than not known
when gen and obj are destroyed?

Is there a solution to call obj.__exit__()?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28629>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to