[Python-bugs-list] [ python-Bugs-726446 ] textwrap.wrap infinite loop

SourceForge.net noreply@sourceforge.net
Tue, 06 May 2003 17:56:11 -0700


Bugs item #726446, was opened at 2003-04-23 14:59
Message generated for change (Comment added) made by gward
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=726446&group_id=5470

Category: Python Library
Group: Python 2.3
>Status: Closed
>Resolution: Fixed
Priority: 6
Submitted By: Jason Petrone (jpetrone)
Assigned to: Greg Ward (gward)
Summary: textwrap.wrap infinite loop

Initial Comment:
textwrap.wrap appears to go into an infinite loop
when called with a width <= 0.  I don't know what the
correct 
behavior  here should be, but I'm guessing this isn't it.

Maybe it should be throwing an exception?


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

>Comment By: Greg Ward (gward)
Date: 2003-05-06 20:56

Message:
Logged In: YES 
user_id=14422

OK, that's pretty easy to check.  Test added in rev 1.20 of
Lib/test/test_textwrap.py, fix in rev 1.25 of Lib/textwrap.py .

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

Comment By: Raymond Hettinger (rhettinger)
Date: 2003-05-06 20:30

Message:
Logged In: YES 
user_id=80475

Greg, do you have time for this one?

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

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