New submission from Tuomas Salo: This code:
import textwrap textwrap.wrap("123 123 1234567", width=5) currently* produces this output: ['123', '123 1', '23456', '7'] I would expect the textwrap module to only break words when absolutely necessary. That is, I would have expected it to produce one break less: ['123', '123', '12345', '67'] This is of course a matter of taste - the current implementation produces more efficiently filled lines. (* I only have access to Python 2.7 and 3.4) ---------- messages: 258999 nosy: Tuomas Salo priority: normal severity: normal status: open title: textwrap should minimize breaks type: behavior versions: Python 2.7, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26214> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com