This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: textwrap: prefix short lines
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: gward Nosy List: akuchling, gward, nnorwitz
Priority: normal Keywords: patch

Created on 2002-09-30 11:48 by akuchling, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
textwrap-patch akuchling, 2002-09-30 11:48 Add self.initial_indent to single-line check.
Messages (2)
msg41278 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2002-09-30 11:48
If the text to be filled is shorter than one line, initial_indent is 
not prefixed to the resulting text.  For example:

>>> textwrap.fill('abc '*18, initial_indent=6*' ')
'      abc abc abc abc ... abc\nabc abc'
>>> textwrap.fill('abc '*10, initial_indent=6*' ')
'abc abc abc abc abc abc abc abc abc abc '
>>>

I believe the attached patch fixes this.


msg41279 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2002-10-08 23:00
Logged In: YES 
user_id=33168

Guido checked in textwrap.py 1.16 which fixed this problem.
 Closing this patch.
History
Date User Action Args
2022-04-10 16:05:42adminsetgithub: 37240
2002-09-30 11:48:56akuchlingcreate