[issue12760] Add create mode to open()

Antoine Pitrou report at bugs.python.org
Sun Jan 8 15:36:58 CET 2012


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

I don't think the "created()" method has to be exposed. People can inspect the "mode" attribute if they want to have that information.
(besides, the semantics are misleading since a new file opened with "w" has also be created, but created() would return False)

There's some bogus indentation in the patch (it uses tab characters in some places).

Also:

+    if not (creating + reading or writing or appending):

Not sure why the "+". Shouldn't it be "or" instead?

----------

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


More information about the Python-bugs-list mailing list