[PATCH 2 of 7] py3: rewrite itervalues() as values() by importer

Gregory Szorc gregory.szorc at gmail.com
Tue Mar 14 11:46:16 EDT 2017


On Tue, Mar 14, 2017 at 1:13 AM, Yuya Nishihara <yuya at tcha.org> wrote:

> On Mon, 13 Mar 2017 12:58:06 -0700, Gregory Szorc wrote:
> > On Mon, Mar 13, 2017 at 11:55 AM, Yuya Nishihara <yuya at tcha.org> wrote:
> > > # HG changeset patch
> > > # User Yuya Nishihara <yuya at tcha.org>
> > > # Date 1489419897 25200
> > > #      Mon Mar 13 08:44:57 2017 -0700
> > > # Node ID c9700b5cb641c10d8b0e6ac90896ebe5cb7c0658
> > > # Parent  b7717d4dc60bcc3a3f4b7b85476954357f52783b
> > > py3: rewrite itervalues() as values() by importer
> > >
> > > I'm not a great fan of these importer magics, but this should be okay
> since
> > > "itervalues" seems as unique name as "iteritems".
> > >
> >
> > I agree it is similar and can be added without too much controversy.
> Since
> > you'll be resending the series, how about adding iterkeys() while you are
> > here?
>
> I thought about that, but I prefer not using iterkeys() at all. We can just
> iterate a dict.
>

Good point. I drop my suggestion to implement iterkeys(). Perhaps I'll
scrub the code base of that anti-pattern...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170314/6160b1b6/attachment.html>


More information about the Mercurial-devel mailing list