[issue1146] TextWrap vs words 1-character shorter than the width

2008-01-19 Thread Georg Brandl
Georg Brandl added the comment: Thanks for the patches, committed in r60093! -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ _

[issue1146] TextWrap vs words 1-character shorter than the width

2008-01-19 Thread Quentin Gallet-Gilles
Quentin Gallet-Gilles added the comment: As i revisited this one for the Bug Day, I found I could optimize the patch a little bit. Here's the updated diff. Also... I think it's a good candidate for 2.5 maintenance release. Any thoughts ? Added file: http://bugs.python.org/file9216/textwrap_revi

[issue1146] TextWrap vs words 1-character shorter than the width

2007-09-16 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- keywords: +patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue1146] TextWrap vs words 1-character shorter than the width

2007-09-14 Thread Georg Brandl
Georg Brandl added the comment: I'll look at this shortly. -- assignee: -> georg.brandl nosy: +georg.brandl __ Tracker <[EMAIL PROTECTED]> __ _

[issue1146] TextWrap vs words 1-character shorter than the width

2007-09-14 Thread Quentin Gallet-Gilles
Quentin Gallet-Gilles added the comment: The previous patch is suboptimal and doesn't solve all cases. This one does. My apologies. __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1146] TextWrap vs words 1-character shorter than the width

2007-09-14 Thread Quentin Gallet-Gilles
Changes by Quentin Gallet-Gilles: __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/optio

[issue1146] TextWrap vs words 1-character shorter than the width

2007-09-14 Thread Quentin Gallet-Gilles
Quentin Gallet-Gilles added the comment: The bug is present in trunk and has been there since rev 33955. This revision contained a fix to an infinite loop when indentation was set longer than width with long word breaking enabled. In that case, it would strip off at least one character on every p

[issue1146] TextWrap vs words 1-character shorter than the width

2007-09-11 Thread sam
New submission from sam: >>> from textwrap import wrap >>> wrap("foobarbaz reallylongwordgoeshere", width = 10) ['foobarbaz r', 'eallylongw', 'ordgoesher', 'e'] >>> print [len(s) for s in _] [11, 10, 10, 1] This only seems to happen when the first word on the line is exactly one character shorte