[PATCH 2 of 2 V3] py3: use namedtuple._replace to produce new tokens

Yuya Nishihara yuya at tcha.org
Sun Oct 16 10:48:27 EDT 2016


On Sun, 16 Oct 2016 16:30:04 +0200, Pierre-Yves David wrote:
> On 10/14/2016 06:55 PM, Martijn Pieters wrote:
> > # HG changeset patch
> > # User Martijn Pieters <mjpieters at fb.com>
> > # Date 1476347257 -3600
> > #      Thu Oct 13 09:27:37 2016 +0100
> > # Node ID d20dd7db86044bdca79825499b913840d726d841
> > # Parent  9031460519503abe5dc430c8ece29d198121cd65
> > py3: use namedtuple._replace to produce new tokens
> 
> We seems to be using a private function of some stdlib type?
> Can you elaborate on why this is a good move?

It is a public function. All public functions of namedtuple start with '_'
to avoid conflicts with field names.


More information about the Mercurial-devel mailing list