[PATCH 4 of 6 py3] dirstate: use iter.__next__ instead of iter.next

Pulkit Goyal 7895pulkit at gmail.com
Thu Mar 16 01:24:19 EDT 2017


On Thu, Mar 16, 2017 at 10:29 AM, Martin von Zweigbergk <
martinvonz at google.com> wrote:

> On Wed, Mar 15, 2017 at 9:13 PM, Pulkit Goyal <7895pulkit at gmail.com>
> wrote:
> > # HG changeset patch
> > # User Pulkit Goyal <7895pulkit at gmail.com>
> > # Date 1489634873 -19800
> > #      Thu Mar 16 08:57:53 2017 +0530
> > # Node ID 69aafa5d3e0f109c7b501758381f65fd9b375196
> > # Parent  db48c50cb5831c7c1265296d8d6c8d589ed41689
> > dirstate: use iter.__next__ instead of iter.next
> >
> > In Python 3 world, iter.next() is renamed to iter.__next__()
>
> Will next(iter) do the same in both versions?
>

​Yeah it do the same. I will measure the perf and if does not lead​
​ to any significance regression (which I think it won't), I will replace
this with next(iter) in V2.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170316/5cbd4e89/attachment.html>


More information about the Mercurial-devel mailing list