Vajrasky Kok added the comment: The quopri_codec uses binascii.b2a_qp method.
>>> binascii.b2a_qp('\r\n\n\n\n') '\r\n\r\n\r\n\r\n' The logic in b2a_qp when dealing with newlines is check whether the first line uses \r\n or \n. If it uses \r\n, then all remaning lines' new lines will be converted to \r\n. if it uses \n, then all remaning lines' new lines will be converted to \n. It has comment on the source code. /* See if this string is using CRLF line ends */ /* XXX: this function has the side effect of converting all of * the end of lines to be the same depending on this detection * here */ I am not sure what the appropriate action here. But doc fix should be acceptable. ---------- nosy: +vajrasky _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20121> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com