[issue15510] textwrap.wrap('') returns empty list

Chris Jerdonek report at bugs.python.org
Sat Aug 4 02:32:03 CEST 2012


Chris Jerdonek added the comment:

> As far as these changes don't fix obvious bugs, no, they shouldn't.
People certainly rely on the current behaviour, and they will start
getting extraneous newlines if you change it (because they will call
'\n'.join(...)).

That line of reasoning is acceptable to me.  And I said from the beginning that I'm open to resolving this issue via changes to the documentation.

But I feel this criterion was not applied to issue 1859.  wrap()'s behavior on newlines is broken to the point that multi-paragraph input is acknowledged as not working.  Additionally, because of that the keyword argument replace_whitespace has no clear use case.  That seems like an obvious bug to me.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15510>
_______________________________________


More information about the Python-bugs-list mailing list