Message280736
| Author |
vstinner |
| Recipients |
martin.panter, ncoghlan, njs, vstinner, yselivanov |
| Date |
2016年11月14日.07:15:53 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<CAMpsgwY0+uzv3Qjr=FQB9uA2S1EGmYRcVdfj4BM+w+9Y7EfdeQ@mail.gmail.com> |
| In-reply-to |
<1479093056.25.0.977008903733.issue28629@psf.upfronthosting.co.za> |
| Content |
> 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__()? |
|