[Python-ideas] `to_file()` method for strings

Andrew Barnert abarnert at yahoo.com
Wed Mar 23 03:56:04 EDT 2016


On Mar 22, 2016, at 21:32, Alexander Belopolsky <alexander.belopolsky at gmail.com> wrote:
> 
>> On Tue, Mar 22, 2016 at 11:51 PM, Andrew Barnert <abarnert at yahoo.com> wrote:
>> Then you don't have to worry about how good the buffering is, what happens if there's a power failure ...
> 
> You are right: it is not uncommon for data scientists to prefer loosing all the computed data rather than the last few blocks in this case. :-) 

The question is whether it's better to have the complete previous version of the data, or 21% of the new version of the data.[1] And the answer is different in different cases, which is why atomic pretty much has to be an option (or a separate function), not always-on. But I think on by default makes sense.

---

[1]: In fact, with delete=False and a sensible pattern, atomic actually gives you the best of both worlds: the previous version of the data is still there, and 21% of the new version is in a tempfile that you can recover if you know what you're doing...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160323/e03d0228/attachment-0001.html>


More information about the Python-ideas mailing list