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-10.18:20:17
SpamBayes Score 7.64191e-05
Marked as misclassified No
Message-id <1331403618.29.0.953936973726.issue14243@psf.upfronthosting.co.za>
In-reply-to
Content
I disagree that it's unacceptable for close() and __del__() to behave differently.  The acceptable difference would be that __del__() closes (if necessary) /and/ deletes the file on disk, while close() merely closes the file.

If you can in fact "change the way the file is opened on Windows so that it can be opened again without closing it first," that would be fine with me.  It isn't clear to me that Windows supports that option, but I'm not an expert.

Another possibility, of course, is something like what's implemented in:
https://github.com/dabrahams/zeroinstall/commit/d76de038ef51bd1dae36280f8743e06c7154b44a#L3R44
(an optional argument to close() that prevents deletion).
History
Date User Action Args
2012-03-10 18:20:18dabrahamssetrecipients: + dabrahams, ncoghlan, pitrou, eric.smith, tim.golden, brian.curtin
2012-03-10 18:20:18dabrahamssetmessageid: <1331403618.29.0.953936973726.issue14243@psf.upfronthosting.co.za>
2012-03-10 18:20:17dabrahamslinkissue14243 messages
2012-03-10 18:20:17dabrahamscreate