Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev

issue 15510: textwrap.wrap() returning empty list

 

 

Python dev RSS feed   Index | Next | Previous | View Threaded


chris.jerdonek at gmail

Aug 3, 2012, 1:46 PM

Post #1 of 2 (160 views)
Permalink
issue 15510: textwrap.wrap() returning empty list

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.

Thanks,
--Chris
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


python at mrabarnett

Aug 3, 2012, 2:51 PM

Post #2 of 2 (152 views)
Permalink
Re: issue 15510: textwrap.wrap() returning empty list [In reply to]

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 ['']

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

Python dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.