[issue22687] horrible performance of textwrap.wrap() with a long word

Antoine Pitrou report at bugs.python.org
Thu Nov 13 12:00:17 CET 2014


Antoine Pitrou added the comment:

I don't understand:

+        expect = ("this-|is-a-useful-|feature-|for-|"
+                  "reformatting-|posts-|from-|tim-|peters'ly").split('|')
+        self.check_wrap(text, 1, expect, break_long_words=False)
+        self.check_split(text, expect)

Why would "is-a-useful" remain unsplit? It looks like you're making up new rules.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22687>
_______________________________________


More information about the Python-bugs-list mailing list