[issue15510] textwrap.wrap('') returns empty list
Antoine Pitrou
report at bugs.python.org
Fri Aug 3 23:42:48 CEST 2012
Antoine Pitrou added the comment:
> For an empty string, sure -- for a string with nothing but white space,
> no:
> --> wrap(' ')
> []
That's because wrap() suppresses extra whitespace by default. Once extra whitespace is suppressed, you are left with an empty text, meaning an empty list of lines. That's perfectly logical.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15510>
_______________________________________
More information about the Python-bugs-list
mailing list