serhiy-storchaka · GitHub

Bug report

>>> textwrap.wrap('Did you say "supercalifragilisticexpialidocious?" How *do* you spell that odd word, anyways?', 12)
['Did you say ', '"supercalifr', 'agilisticexp', 'ialidocious?', '" How *do*', 'you spell', 'that odd', 'word,', 'anyways?']

Note a trailing space in the first line. No trailing spaces in other lines.

This is even in the tests, but I do not think it is an intentional behavior. The bug was introduced in the fix for:

Linked PRs

Read the original on github.com ↗