osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Textwrap doesn't honour NO-BREAK SPACE


"Steve D'Aprano"  wrote in message 
news:59cdd938$0$14933$b1db1813$d948b532 at news.astraweb.com...

I don't have Python 3.6 installed, can somebody check to see whether or not 
it
shows the same (wrong) behaviour?

[...]

C:\Users\User>python
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import textwrap
>>> text = ('Lorum ipsum dolor sit amet, consectetur adipiscing'
...         ' elit ZZZ\xa0ZZZ sed do euismod tempor incididunt'
...         ' ut labore et dolore magna aliqua.')
>>> print(textwrap.fill(text, 59))
Lorum ipsum dolor sit amet, consectetur adipiscing elit
ZZZ ZZZ sed do euismod tempor incididunt ut labore et
dolore magna aliqua.
>>>

It seems to have been fixed.

Frank Millman