Antoine Pitrou added the comment: Le samedi 04 août 2012 à 00:05 +0000, Chris Jerdonek a écrit : > 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 that's the right interpretation. The only point of preserving whitespace is to preserve indentation, which is pointless when there's nothing after the whitespace. > > 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". Of course. The point is, if the alternative is no better than the current behaviour, the status quo wins. > Is it your opinion that no changes to textwrap should be made in any > versions that change existing behavior on some input? 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(...)). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15510> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com