<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 23, 2016 at 6:20 PM, Sven R. Kunze <span dir="ltr"><<a href="mailto:srkunze@mail.de" target="_blank">srkunze@mail.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
bash: echo "my string" >> my_file<br><span style="font-size:12.8px">python: with open('my_file', 'w') as f: f.write('my string')</span></blockquote><div>... </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
I can tell you from my experience with several aged Python developers that they regularly fail to implement atomic file operations. Just saying.</blockquote></div><br>What make you think your bash example implements an atomic write? It actually performs an append and therefore not equivalent to the python code that followed.</div></div>