[docs] [issue12760] Add create mode to open()
report at bugs.python.org
Thu Aug 18 13:56:54 CEST 2011
David Townshend <aquavitae69 at gmail.com> added the comment:
My aim isn't to add all the commonly used flags, that would be pointless since its already possible using os.open. The aim is to add a missing feature to the builtin open(), i.e. file creation. At the moment open() implements read, write, and append, and creation is only implied by write. But in many cases, an explicit creation is desired (i.e, specifically create a new file, with an exception on failure). It is true that this is possible with os.open, but it is somewhat obscure, especially for beginners, and is not as easy to read as "open(file, 'c')"
Python tracker <report at bugs.python.org>
More information about the docs