New submission from Nick Coghlan <ncogh...@gmail.com>:

After yet again trying to use "rw" to open a file in read/write mode, having it 
fail, and then having to look up the docs to remind myself that the correct 
spelling is "r+", I'm finally filing this to suggest we make the obvious "rw" 
spelling actually work.

Rather than making it an alias for any of the existing modes, I'd suggest that 
it combine the features of "r+" and "a+":

* like "r+" it would start the file pointer at the beginning of the file
* like "a+" it would create the file if it didn't exist, while leaving existing 
files alone

----------
messages: 386510
nosy: ncoghlan
priority: low
severity: normal
status: open
title: Accept file mode "rw" to open-or-create a file and seek to the start
type: enhancement

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43133>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to