[Python-ideas] textwrap.TextWrapper width=None (or Inf)

Matej Cepl mcepl at redhat.com
Thu Dec 26 23:17:34 CET 2013


Hi,

I wonder why nobody asked on bugs.python.org for rather obvious 
functionality of being able to reflow a paragraph to one line?  
Meaning, that any paragraph would be stripped of all whitespace 
(etc. ... whatever is configured by the additional parameters of 
the TextWrapper class) and then joined into long line. I know 
that

    ''.join(text.splitlines())
    
does something similar, but

    a) it doesn't handle all whitespace munging,
    b) it just seems like an obvious functionality for 
    TextWrapper to have.

Any thoughts on it? Should I just file a bug?

Best,

Matěj

-- 
http://www.ceplovi.cz/matej/, Jabber: mcepl<at>ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
 
[...] a superior pilot uses his superior judgment to avoid having to exercise
his superior skill.
  -- http://www.jwz.org/blog/2009/09/that-duct-tape-silliness/#comment-10653

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20131226/11518279/attachment.sig>


More information about the Python-ideas mailing list