Re: [PATCH py3] ui: construct _keepalnum list in a python3-friendly way

2017-02-20 Thread Yuya Nishihara
On Sun, 19 Feb 2017 20:05:50 -0500, Augie Fackler wrote: > > > On Feb 19, 2017, at 9:29 AM, Yuya Nishihara wrote: > > > > On Sat, 18 Feb 2017 22:58:10 +, Martijn Pieters wrote: > >> On 16 Feb 2017, at 16:35, Augie Fackler >> > wrote: > >>> +if pycompat.ispy3: > >>>

Re: [PATCH py3] ui: construct _keepalnum list in a python3-friendly way

2017-02-19 Thread Augie Fackler
> On Feb 19, 2017, at 9:29 AM, Yuya Nishihara wrote: > > On Sat, 18 Feb 2017 22:58:10 +, Martijn Pieters wrote: >> On 16 Feb 2017, at 16:35, Augie Fackler > > wrote: >>> +if pycompat.ispy3: >>> +_unicodes = [bytes([c]).decode('latin1') for c in range(256)] >>> +

Re: [PATCH py3] ui: construct _keepalnum list in a python3-friendly way

2017-02-19 Thread Yuya Nishihara
On Sat, 18 Feb 2017 22:58:10 +, Martijn Pieters wrote: > On 16 Feb 2017, at 16:35, Augie Fackler > wrote: > > +if pycompat.ispy3: > > +_unicodes = [bytes([c]).decode('latin1') for c in range(256)] > > +_notalnum = [s.encode('latin1') for s in _unicodes if not s

Re: [PATCH py3] ui: construct _keepalnum list in a python3-friendly way

2017-02-18 Thread Martijn Pieters
On 16 Feb 2017, at 16:35, Augie Fackler mailto:r...@durin42.com>> wrote: > +if pycompat.ispy3: > +_unicodes = [bytes([c]).decode('latin1') for c in range(256)] > +_notalnum = [s.encode('latin1') for s in _unicodes if not s.isalnum()] ... > +_keepalnum = ''.join(_notalnum) This could be mo

Re: [PATCH py3] ui: construct _keepalnum list in a python3-friendly way

2017-02-18 Thread Yuya Nishihara
On Thu, 16 Feb 2017 11:35:41 -0500, Augie Fackler wrote: > # HG changeset patch > # User Augie Fackler > # Date 1487262890 18000 > # Thu Feb 16 11:34:50 2017 -0500 > # Node ID 791b4e846a7b9a0783440b9504585438777fe2d2 > # Parent 1ee685defe80117cf6aafea1ede6c33c478abceb > ui: construct _keepal

[PATCH py3] ui: construct _keepalnum list in a python3-friendly way

2017-02-16 Thread Augie Fackler
# HG changeset patch # User Augie Fackler # Date 1487262890 18000 # Thu Feb 16 11:34:50 2017 -0500 # Node ID 791b4e846a7b9a0783440b9504585438777fe2d2 # Parent 1ee685defe80117cf6aafea1ede6c33c478abceb ui: construct _keepalnum list in a python3-friendly way It'll be more expensive, but it pre