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

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Oct 16 10:51:44 EDT 2016



On 10/16/2016 04:48 PM, Yuya Nishihara wrote:
> 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.

Haaaaa, much confusion.


-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list