Message155375
| Author |
ncoghlan |
| Recipients |
brian.curtin, dabrahams, eric.smith, ncoghlan, pitrou, tim.golden |
| Date |
2012年03月11日.03:45:33 |
| SpamBayes Score |
0.0013275903 |
| Marked as misclassified |
No |
| Message-id |
<1331437534.15.0.11806152347.issue14243@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Dave, decoupling the lifecycle of the created file from the object that created it is exactly what delete=False already covers. The complicated dance in NamedTemporaryFile is only to make *__del__* work a bit more reliably during process shutdown (due to some messy internal problems with what CPython is doing at that point). If you're doing deterministic cleanup (even via atexit), you don't need any of that - you can just use os.unlink(). |
|