Berker Peksag added the comment: Thanks for the report, George.
Using 'r+' means that you don't have to reopen the same file if you want to both read and write to it but it's up to you to check where the cursor is before writing anything to it. Since the ConfigParser.write() method doesn't have any control over the file object (and this is not the only place that someone can pass a file object in the stdlib), I don't think we should make its documentation more complicated. I wouldn't strongly object adding a short sentence about the behavior of the + mode if someone wants to write a patch. Doc/tutorial/inputoutput.rst or Doc/library/functions.rst might be a good place to put that information. ---------- nosy: +berker.peksag _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28714> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com