[Python-ideas] Add create mode to open()

Calvin Spealman ironfroggy at gmail.com
Wed Aug 17 04:10:22 CEST 2011

On Tue, Aug 16, 2011 at 11:45 AM, David Townshend <aquavitae69 at gmail.com> wrote:
> This idea was proposed in the discussion on shutil.move, but I thought it
> would be worth posting separately to avoid confusing the discussion.
> The idea is to add a create mode ('c') to the builtin open() function, which
> will have the same effect as os.open(file, os.O_EXCL|os.O_CREAT).  I have
> added an issue (http://bugs.python.org/issue12760) for this, including a
> patch.

While there are plenty of responders debating how unix-y or sensible
this is from the standpoint of other languages or precedents, I think
this makes sense from the standpoint of new users and a fresh
viewpoints. Creating a new file is a very sensible thing to want in a
single operation.

> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas

Read my blog! I depend on your acceptance of my opinion! I am interesting!
Follow me if you're into that sort of thing: http://www.twitter.com/ironfroggy

More information about the Python-ideas mailing list