Tarek Ziadé <ziade.ta...@gmail.com> added the comment: This idiom makes sense when you want to do some things with an open file, and replaces the usual try..finally idiom.
That's not what we want to do here. We want to write data in a file in a single step, in an atomic manner. Giving the ability to the developers to work in a context manager means that you potentially give them the ability to break this atomicity. So I don't think the context manager idiom prevails, and should be avoided : shutil.atomic_write is asked to write a file, given some data, and don't return until it's done. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8604> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com