Message155374
If file.close() "offers deterministic resource management," then you have to consider the file's open/closed state to be a resource separate from its existence. A NamedTemporaryFile whose close() deterministically managed the open/closed state but not the existence of the file would be consistent with file. That said, I understand the move toward deprecating (in the informal sense) cleanups that rely on GC.
I'm not suggesting breaking backward compatibility, either. I'm suggesting that it might make sense to allow an explicit close-without-delete as an /extension/ of the current interface. Given the move away from GC-cleanups, you'd probably want an explicit unlink() method as well in that case. |
|
Date |
User |
Action |
Args |
2012-03-11 03:30:16 | dabrahams | set | recipients:
+ dabrahams, ncoghlan, pitrou, eric.smith, tim.golden, brian.curtin |
2012-03-11 03:30:16 | dabrahams | set | messageid: <1331436616.41.0.357710725404.issue14243@psf.upfronthosting.co.za> |
2012-03-11 03:30:15 | dabrahams | link | issue14243 messages |
2012-03-11 03:30:15 | dabrahams | create | |
|