Textwrap doesn't honour NO-BREAK SPACE
Steve D'Aprano
steve+python at pearwood.info
Fri Sep 29 02:35:02 EDT 2017
On Fri, 29 Sep 2017 03:55 pm, Terry Reedy wrote:
>> Expected result:
>>
>>
>> Lorum ipsum dolor sit amet, consectetur adipiscing elit
>> ZZZ ZZZ sed do euismod tempor incididunt ut labore et
>> dolore magna aliqua.
>
> On Windows 10, I get this on 2.7, 3.5, 3.6, 3.7.
>
>> Actual result in Python 3.5 and older:
>>
>> Lorum ipsum dolor sit amet, consectetur adipiscing elit ZZZ
>> ZZZ sed do euismod tempor incididunt ut labore et dolore
>> magna aliqua.
Sorry Terry, it isn't clear to me which result (expected, or actual) is "this"
in your comment.
I wonder if the behaviour is platform specific? On Linux, I've tried Python 2.7
(after adjusting for a Unicode string rather than byte string), 3.3 and 3.5 and
it breaks on the NO-BREAK SPACE on all three.
--
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.
More information about the Python-list
mailing list