[PATCH] keyword: replace map() with list comprehension

Yuya Nishihara yuya at tcha.org
Sat Jan 20 21:46:12 EST 2018


On Sat, 20 Jan 2018 14:46:49 +0100, Christian Ebert wrote:
> * Yuya Nishihara on Saturday, January 20, 2018 at 21:29:37 +0900
> > On Sat, 20 Jan 2018 12:00:00 +0100, Christian Ebert wrote:
> >> # HG changeset patch
> >> # User Christian Ebert <blacktrash at gmx.net>
> >> # Date 1516442383 -3600
> >> #      Sat Jan 20 10:59:43 2018 +0100
> >> # Node ID f1d6d72008e373c24b8057bebe999544f7a45711
> >> # Parent  2384523cee4dcc83f67b73bf1862c68ddf1afc49
> >> keyword: replace map() with list comprehension
> > 
> > for what?
> 
> I was under the impression that this is (considered) faster?

Their performance characteristics wouldn't differ. It's rather a cosmetic issue
whether to use map() or not. Personally I like map() when it can get rid of
a parameter.


More information about the Mercurial-devel mailing list