Re: Textwrap doesn't honour NO-BREAK SPACE

2017-09-29 Thread Steve D'Aprano
On Fri, 29 Sep 2017 07:11 pm, Wolfgang Maier wrote: > On 29.09.2017 11:05, Wolfgang Maier wrote: >> On 29.09.2017 07:25, Steve D'Aprano wrote: >>> I'm pretty sure this is a bug. >>> >> >> Yes, it is a bug, but a known one: https://bugs.python.org/issue20491 >> >> The fix got backported even to 3

Re: Textwrap doesn't honour NO-BREAK SPACE

2017-09-29 Thread Vincent Vande Vyvre
Le 29/09/17 à 08:58, Frank Millman a écrit : "Steve D'Aprano"  wrote in message news:59cde998$0$14935$b1db1813$d948b...@news.astraweb.com... 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 tempo

Re: Textwrap doesn't honour NO-BREAK SPACE

2017-09-29 Thread Terry Reedy
On 9/29/2017 2:35 AM, Steve D'Aprano wrote: 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.

Re: Textwrap doesn't honour NO-BREAK SPACE

2017-09-29 Thread breamoreboy
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

Re: Textwrap doesn't honour NO-BREAK SPACE

2017-09-29 Thread Wolfgang Maier
On 29.09.2017 11:05, Wolfgang Maier wrote: On 29.09.2017 07:25, Steve D'Aprano wrote: I'm pretty sure this is a bug. Yes, it is a bug, but a known one: https://bugs.python.org/issue20491 The fix got backported even to 3.5, but I guess it depends which minor version you are running. I'm pret

Re: Textwrap doesn't honour NO-BREAK SPACE

2017-09-29 Thread Wolfgang Maier
On 29.09.2017 07:25, 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? import textwrap text = ('Lorum ipsum dolor sit amet, consectetur adipiscing' ' elit ZZZ\xa0ZZZ sed do euismod tempor incididunt'

Re: Textwrap doesn't honour NO-BREAK SPACE

2017-09-29 Thread Thomas Jollans
On 2017-09-29 08:58, Frank Millman wrote: > > It confirms that the problem was there in 3.5, but is fixed in 3.6. > Same on Linux: 3.5 has the bug, 3.6 doesn't. (Python 3.5 from Red Hat, 3.6 from Anaconda) -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list

Re: Textwrap doesn't honour NO-BREAK SPACE

2017-09-29 Thread Frank Millman
"Steve D'Aprano" wrote in message news:59cde998$0$14935$b1db1813$d948b...@news.astraweb.com... 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.

Re: Textwrap doesn't honour NO-BREAK SPACE

2017-09-28 Thread Steve D'Aprano
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 Pyth

Re: Textwrap doesn't honour NO-BREAK SPACE

2017-09-28 Thread Terry Reedy
On 9/29/2017 1:25 AM, 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? import textwrap text = ('Lorum ipsum dolor sit amet, consectetur adipiscing' ' elit ZZZ\xa0ZZZ sed do euismod tempor incididunt'

Re: Textwrap doesn't honour NO-BREAK SPACE

2017-09-28 Thread Frank Millman
"Steve D'Aprano" wrote in message news:59cdd938$0$14933$b1db1813$d948b...@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

Textwrap doesn't honour NO-BREAK SPACE

2017-09-28 Thread Steve D'Aprano
I don't have Python 3.6 installed, can somebody check to see whether or not it shows the same (wrong) behaviour? import textwrap text = ('Lorum ipsum dolor sit amet, consectetur adipiscing' ' elit ZZZ\xa0ZZZ sed do euismod tempor incididunt' ' ut labore et dolore magna aliqua.') p