[issue8604] Alias for distutils.file_util.write_file in e.g. shutils

Antoine Pitrou report at bugs.python.org
Mon May 3 14:54:19 CEST 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

This sounds silly to me. You can write a file in two lines:

with open("foo", "wb") as f:
    f.write(contents)

If you want to do something more useful, you can add a function for atomic writing of a file.

----------
nosy: +pitrou
versions: +Python 3.2 -Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8604>
_______________________________________


More information about the Python-bugs-list mailing list