Re: [PATCH] py3: have an utility function to return string

2016-10-01 Thread Yuya Nishihara
On Sun, 2 Oct 2016 06:36:35 +0530, Pulkit Goyal wrote: > Is encoding.encoding public or private. Can I convert it to unicode? No. It's read/written freely. We could cache a unicode variant internally if that matters, but we would need a setter function to invalidate the cache. % grep

Re: [PATCH] py3: have an utility function to return string

2016-10-01 Thread Pulkit Goyal
On Fri, Sep 16, 2016 at 7:16 PM, Yuya Nishihara wrote: > On Thu, 15 Sep 2016 23:59:59 +0530, Pulkit Goyal wrote: >> On Thu, Sep 15, 2016 at 7:06 PM, Yuya Nishihara wrote: >> > On Wed, 14 Sep 2016 22:45:27 +0530, Pulkit Goyal wrote: >> >> # HG changeset patch >> >> #

Re: [PATCH] py3: have an utility function to return string

2016-09-16 Thread Yuya Nishihara
On Thu, 15 Sep 2016 23:59:59 +0530, Pulkit Goyal wrote: > On Thu, Sep 15, 2016 at 7:06 PM, Yuya Nishihara wrote: > > On Wed, 14 Sep 2016 22:45:27 +0530, Pulkit Goyal wrote: > >> # HG changeset patch > >> # User Pulkit Goyal <7895pul...@gmail.com> > >> # Date 1473787789 -19800 > >>

Re: [PATCH] py3: have an utility function to return string

2016-09-16 Thread Martijn Pieters
On 16 September 2016 at 11:09, Pierre-Yves David wrote: >>> +return word.decode(sys.getfilesystemencoding()) >> >> >> Can we assume 'word' was encoded in file-system codec? No, this is being used for *source code literals*, so getfilesystemencoding is the

Re: [PATCH] py3: have an utility function to return string

2016-09-15 Thread Pulkit Goyal
On Thu, Sep 15, 2016 at 7:06 PM, Yuya Nishihara wrote: > On Wed, 14 Sep 2016 22:45:27 +0530, Pulkit Goyal wrote: >> # HG changeset patch >> # User Pulkit Goyal <7895pul...@gmail.com> >> # Date 1473787789 -19800 >> # Tue Sep 13 22:59:49 2016 +0530 >> # Node ID