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

Chris Jerdonek report at bugs.python.org
Sat Aug 4 02:05:24 CEST 2012


Chris Jerdonek added the comment:

> > wrapping, "leading whitespace in the first line is always preserved,
> > though."
> Ok, then it's a bit fuzzy. That whitespace is as much trailing as
> leading, after all :)

That's why the word "always" is there. :)

> I'm not sure I see the relevance. strip() returns an empty string
> because its return type is a string, what else could it return?

My point was that your line of logic was not as clear-cut as you suggested.  One could argue that dropping whitespace to become the empty string is more reasonable than dropping it become "no string".

Is it your opinion that no changes to textwrap should be made in any versions that change existing behavior on some input?  Otherwise, what are your criteria?

----------

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


More information about the Python-bugs-list mailing list