Issue 2635: textwrap: bug in 'fix_sentence_endings' option (original) (raw)
Issue2635
Created on 2008-04-15 05:54 by gscelsi, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (4) | ||
---|---|---|
msg65501 - (view) | Author: Giuseppe Scelsi (gscelsi) | Date: 2008-04-15 05:54 |
>>> textwrap.fill('File stdio.h is nice.', ... fix_sentence_endings=True) 'File stdio.h is nice.' ^-- wrong double space! The problem is with the compiled regexp 'sentence_end_re' in 'textwrap.py'. A possible fix would be to add the following line after line 90 in textwrap.py: r'$' # end of chunk Giuseppe | ||
msg65645 - (view) | Author: Mark Dickinson (mark.dickinson) * ![]() |
Date: 2008-04-20 13:15 |
I can reproduce the problem, and agree with the analysis. Giuseppe, do you have time to produce a patch that fixes this problem and adds appropriate tests to test_textwrap.py? | ||
msg65655 - (view) | Author: Giuseppe Scelsi (gscelsi) | Date: 2008-04-20 23:53 |
Mark, I am not familiar with the process and at this particular time I am quite busy. I am happy to do it if it not urgent, but that might mean after I come back from overseas in June. Otherwise please go ahead with the changes, for someone familiar with the process it should be a very simple matter. PLease let me know. Thanks and regards, Giuseppe ---- > Mark Dickinson <dickinsm@gmail.com> added the comment: > > I can reproduce the problem, and agree with the analysis. > > Giuseppe, do you have time to produce a patch that fixes > this problem and adds appropriate tests to test_textwrap.py? > > ---------- > keywords: +easy > nosy: +marketdickinson > priority: -> normal > versions: +Python 2.5, Python 2.6 > > __________________________________ > Tracker <report@bugs.python.org> > <http://bugs.python.org/issue2635> > __________________________________ | ||
msg65794 - (view) | Author: Mark Dickinson (mark.dickinson) * ![]() |
Date: 2008-04-25 16:59 |
Fixed for Python 2.6 in r62500. Thanks for the report! |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:33 | admin | set | github: 46887 |
2008-04-25 17:00:02 | mark.dickinson | set | status: open -> closedresolution: fixed |
2008-04-25 16:59:46 | mark.dickinson | set | messages: + |
2008-04-20 23:53:04 | gscelsi | set | messages: + |
2008-04-20 13:15:17 | mark.dickinson | set | priority: normalkeywords: + easymessages: + nosy: + mark.dickinsonversions: + Python 2.6, Python 2.5 |
2008-04-15 05:54:45 | gscelsi | create |