[Python-Dev] issue 15510: textwrap.wrap() returning empty list

MRAB python at mrabarnett.plus.com
Fri Aug 3 23:51:33 CEST 2012


On 03/08/2012 21:46, Chris Jerdonek wrote:
> I would like people's opinions on issue 15510, specifically whether it
> should be addressed and in what versions:
>> http://bugs.python.org/issue15510
>> Jesús suggested that I ask. The issue relates to textwrap.wrap()'s
> behavior when wrapping strings that contain no non-whitespace
> characters -- in particular the empty string.
>If you don't want the empty list, you could just write:
 wrap(text) or ['']


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /