]> granicus.if.org Git - python/commit
Issue #12451: Add support.create_empty_file()
authorVictor Stinner <victor.stinner@haypocalc.com>
Thu, 30 Jun 2011 21:25:47 +0000 (23:25 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Thu, 30 Jun 2011 21:25:47 +0000 (23:25 +0200)
commitbf816223dfe8f1d36a020b4bc02060b8d1ce7d26
tree3651ee82210cb2110b6808a2545471cac321a22f
parent61600cb0c357fcdca048cee586865a26417dbd70
Issue #12451: Add support.create_empty_file()

We don't need to create a temporary buffered binary or text file object just to
create an empty file.

Replace also os.fdopen(handle).close() by os.close(handle).
17 files changed:
Lib/distutils/tests/test_build_py.py
Lib/test/support.py
Lib/test/test_dbm.py
Lib/test/test_glob.py
Lib/test/test_imp.py
Lib/test/test_import.py
Lib/test/test_mailbox.py
Lib/test/test_optparse.py
Lib/test/test_os.py
Lib/test/test_pkgimport.py
Lib/test/test_posix.py
Lib/test/test_reprlib.py
Lib/test/test_runpy.py
Lib/test/test_shutil.py
Lib/test/test_tarfile.py
Lib/test/test_unicode_file.py
Lib/test/test_zipimport.py