Textwrap doesn't honour NO-BREAK SPACE

breamoreboy at gmail.com breamoreboy at gmail.com
Fri Sep 29 03:14:48 EDT 2017


On Friday, September 29, 2017 at 6:46:31 AM UTC+1, Frank Millman wrote:
> "Steve D'Aprano"  wrote
> 
> 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

FTR https://bugs.python.org/issue20491

--
Kindest regards.

Mark Lawrence.



More information about the Python-list mailing list