New submission from STINNER Victor: Copy of Antoine Pitrou's email (sent in 2012 ;-): https://mail.python.org/pipermail/python-dev/2012-August/121396.html
Hello, I was considering a FileIO.writelines() implementation based on writev() and I noticed that the current RawIO.writelines() implementation is broken: RawIO.write() can return a partial write but writelines() ignores the result and happily proceeds to the next iterator item (and None is returned at the end). (it's probably broken with non-blocking streams too, for the same reason) In the spirit of RawIO.write(), I think RawIO.writelines() could return the number of bytes written (allowing for partial writes). Regards Antoine. -- Software development and contracting: http://pro.pitrou.net ---------- components: IO messages: 259640 nosy: haypo priority: normal severity: normal status: open title: Raw I/O writelines() broken versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26292> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com