Chris Jerdonek <chris.jerdo...@gmail.com> added the comment: > def wrap_paragraphs(text, width=70, **kwargs): > return [line for para in text.splitlines() for line in > textwrap.wrap(para, width, **kwargs)]
I just want to point out that, at least for the purposes of this issue, I don't believe the above is equivalent to what we want. For example-- >>> wrap_paragraphs('a\n\nb', replace_whitespace=False) ['a', 'b'] With replace_whitespace=False, we want to preserve newline information, which would instead mean a return value of-- ['a', '', 'b'] ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1859> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com