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.wrap infinite loop
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gward Nosy List: gward, jpetrone, rhettinger
Priority: high Keywords:

Created on 2003-04-23 18:59 by jpetrone, last changed 2022-04-10 16:08 by admin. This issue is now closed.

Messages (3)
msg15579 - (view) Author: Jason Petrone (jpetrone) Date: 2003-04-23 18:59
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?
msg15580 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2003-05-07 00:30
Logged In: YES 
user_id=80475

Greg, do you have time for this one?
msg15581 - (view) Author: Greg Ward (gward) (Python committer) Date: 2003-05-07 00:56
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 .
History
Date User Action Args
2022-04-10 16:08:17adminsetgithub: 38356
2003-04-23 18:59:16jpetronecreate