[Python-bugs-list] [ python-Bugs-577106 ] textwrap module can't cope with newlines

noreply@sourceforge.net noreply@sourceforge.net
Wed, 03 Jul 2002 11:29:09 -0700


Bugs item #577106, was opened at 2002-07-03 19:08
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=577106&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Jon Ribbens (jribbens)
Assigned to: Greg Ward (gward)
Summary: textwrap module can't cope with newlines

Initial Comment:
The textwrap module cannot cope with newlines. By 
default, it replaces them with spaces, which is very 
annoying. However, this is livable with since you can 
manually set replace_whitespace to what its default 
should be, i.e. False.

However, the textwrap module appears not to know that 
a newline should reset the current column to zero, so 
even with replace_whitespace set to False, it does not 
wrap paragraphs properly.

Oh yes, and expand_tabs should be False by default as 
well ;-)

----------------------------------------------------------------------

>Comment By: Jon Ribbens (jribbens)
Date: 2002-07-03 19:29

Message:
Logged In: YES 
user_id=76089

I have attached a patch which fixes the newlines problem. I'm 
afraid I think this module is rather a mess though.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=577106&group_id=5470