Chris Jerdonek added the comment:

> That's because wrap() suppresses extra whitespace by default. 

But the documentation for drop_whitespace clearly states that, after wrapping, 
"leading whitespace in the first line is always preserved, though."

> Once extra whitespace is suppressed, you are left with an empty text, meaning 
> an empty list of lines. That's perfectly logical.

I wouldn't say that it is "perfectly" logical.  String methods that drop 
characters from the beginning or end of a string return an empty string for 
empty text.

>>> "   ".strip()
''

> Furthermore, by "fixing" this, you may break existing software.

Issue 1859 is an arguably larger change that will also break existing software, 
and that issue has been kept open.

One scenario to consider: if we agree to fix issue 1859 in some versions, might 
that change whether we should address this issue in those versions as well?

----------

_______________________________________
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

Reply via email to