Message187423
| Author |
benjamin.peterson |
| Recipients |
Anssi.Kääriäinen, amaury.forgeotdarc, benjamin.peterson, docs@python, isoschiz, ncoghlan, pconnell, pitrou, vstinner |
| Date |
2013年04月20日.13:19:42 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1366463983.04.0.0778469066172.issue17468@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
In a sense, doing something like "with self.lock" in a generator is already a leak. Even if there wasn't a cycle, collection could be arbitrarily delayed (in partincular on non-CPython VMs). I wonder if making generators context managers which call close() on exit would help. |
|