A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-July/112171.html below:

[Python-Dev] cpython: Issue #12451: Add support.create_empty_file()

[Python-Dev] cpython: Issue #12451: Add support.create_empty_file() [Python-Dev] cpython: Issue #12451: Add support.create_empty_file()Antoine Pitrou solipsis at pitrou.net
Fri Jul 1 11:24:53 CEST 2011
On Thu, 30 Jun 2011 23:25:59 +0200
victor.stinner <python-checkins at python.org> wrote:
> http://hg.python.org/cpython/rev/0c49260e85a0
> changeset:   71103:0c49260e85a0
> user:        Victor Stinner <victor.stinner at haypocalc.com>
> date:        Thu Jun 30 23:25:47 2011 +0200
> summary:
>   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.

Is there a reason for this?
I find it quite explicit and obvious what the following does:

    with open("somefile", "wb"):
        pass

so I wonder what replacing it with support.create_empty_file() brings
(except from having to lookup yet another helper function).

Regards

Antoine.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4