textwrap.fill algorithm? (Difference with vim)

MRAB python at mrabarnett.plus.com
Fri Apr 21 20:52:14 EDT 2017

On 2017-04-21 23:17, Matěj Cepl wrote:
> On 2017-04-21, 21:54 GMT, Peter Otten wrote:
>> It's not the algorithm, it's the width. Try 
>> textwrap.fill(text, 72).
> I don’t understand. Why 72? I have set tw=65 in vim.
textwrap.fill counts characters. It won't put "grown so" on the first 
line because that would make it longer than 65 characters (72, to be exact).

Why is Vim trying to put 72 characters onto the first line?

More information about the Python-list mailing list