This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dabrahams
Recipients brian.curtin, dabrahams, eric.smith, ncoghlan, pitrou, tim.golden
Date 2012-03-11.03:30:15
SpamBayes Score 3.29222e-05
Marked as misclassified No
Message-id <1331436616.41.0.357710725404.issue14243@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-03-11 03:30:16dabrahamssetrecipients: + dabrahams, ncoghlan, pitrou, eric.smith, tim.golden, brian.curtin
2012-03-11 03:30:16dabrahamssetmessageid: <1331436616.41.0.357710725404.issue14243@psf.upfronthosting.co.za>
2012-03-11 03:30:15dabrahamslinkissue14243 messages
2012-03-11 03:30:15dabrahamscreate