[issue28660] TextWrapper break_long_words=True, break_on_hyphens=True on long words

Irit Katriel report at bugs.python.org
Fri Oct 16 13:29:34 EDT 2020


Irit Katriel <iritkatriel at yahoo.com> added the comment:

Actually I see what Serhiy meant about the hyphen algorithm - the regex breaking up words. Yes, this is applied to long words and the reason he stated for this issue is correct.

It is probably possible to make that regex understand width and long-words, but it would be more complicated and will need to be recalculated for each width. I think long words are not the typical input, so it's better to handle them separately and keep the rest simple.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28660>
_______________________________________


More information about the Python-bugs-list mailing list