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.

Author tlynn
Recipients BreamoreBoy, georg.brandl, gvanrossum, gward, jerith, mark.dickinson, mrabarnett, palfrey, terry.reedy, tlynn
Date 2010-11-23.21:34:02
SpamBayes Score 3.8785238e-08
Marked as misclassified No
Message-id <>
I've also been attempting to look into this and came up with an almost identical patch, which is promising:

I missed the wordsep_simple_re though.

Testing it is the hard part.  I've got a few examples that could become tests in that repository, but it's far from conclusive.

One corner case I found is trailing whitespace becoming a blank line:

>>> from textwrap import TextWrapper
>>> T = TextWrapper(replace_whitespace=False, drop_whitespace=False, width=9)
>>> T.wrap('x'*9 + ' \nfoo')
['xxxxxxxxx', ' ', 'foo']

I think it's fine.  drop_whitespace=True removes the blank line, and those who really want drop_whitespace=False can remove the blank lines easily.
Date User Action Args
2010-11-23 21:34:06tlynnsetrecipients: + tlynn, gvanrossum, gward, georg.brandl, terry.reedy, mark.dickinson, palfrey, jerith, mrabarnett, BreamoreBoy
2010-11-23 21:34:05tlynnsetmessageid: <>
2010-11-23 21:34:02tlynnlinkissue1859 messages
2010-11-23 21:34:02tlynncreate