New submission from Brian Kearns: In file.writelines, the conditions in this if statement are bogus. If f->f_binary and AsReadBuffer succeeds (returns 0), AsCharBuf is still tried. So, for example, passing an array('c') to a file('wb').writelines fails, when it seems the intention of the code/comments was to have it succeed.
---------- files: fix_file_writelines-py27.patch keywords: patch messages: 217162 nosy: bdkearns priority: normal severity: normal status: open title: bug in file.writelines accepting buffers type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file35036/fix_file_writelines-py27.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21350> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com