[PATCH 6 of 9] byteify-strings: do not rewrite system string literals to u''

Yuya Nishihara yuya at tcha.org
Tue Jun 19 11:25:37 UTC 2018


On Tue, 19 Jun 2018 00:07:55 +0530, Pulkit Goyal wrote:
> On Mon, Jun 18, 2018 at 6:47 PM Yuya Nishihara <yuya at tcha.org> wrote:
> > # HG changeset patch
> > # User Yuya Nishihara <yuya at tcha.org>
> > # Date 1527777875 -32400
> > #      Thu May 31 23:44:35 2018 +0900
> > # Node ID 5cdd7f14f888f265459ab94b79ae837d515a2ad8
> > # Parent  e17f54b6889bceba8abbe7d4b9c450e66125a807
> > byteify-strings: do not rewrite system string literals to u''
> >
> > It would make things worse on Python 2 because unicode processing is
> > generally
> > slower than byte string. We should just leave system strings unmodified.
> 
> ​I think we can make this change to the transformer too.​

It only matters on Python 2. On Python 3, u'...' is identical to '...'.



More information about the Mercurial-devel mailing list