From: Junio C Hamano <gitster@pobox.com>
To: "Hervé Beraud" <herveberaud.pro@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] make hg-to-git compatible with python2.x and 3.x
Date: Tue, 20 Feb 2018 11:19:01 -0800 [thread overview]
Message-ID: <xmqqsh9v31wa.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <xmqqwoz7324d.fsf@gitster-ct.c.googlers.com> (Junio C. Hamano's message of "Tue, 20 Feb 2018 11:14:10 -0800")
Junio C Hamano <gitster@pobox.com> writes:
> - map(lambda ..., collection) is not liked; use list comprehension.
> ...
> I am not sure about the change from map(lambda ...) to list
> comprehension, though. Not that I have a preference for or against
> (I am not a Python person), but I do not know if this is a change
> necessary to run with Python 3 or if it is merely more preferred to
> use list comprehension.
> ...
>> - prnts = map(lambda x: x[:x.find(':')], prnts)
>> + prnts = [x[:x.find(':')] for x in prnts]
Well, I should have dug this myself a bit more [*1*] before hitting
[SEND]. This change is required because map() no longer returns a
list. So the bullet item in the proposed commit log message in my
earlier message should be updated to say that instead--it was unclear
to me so I phrased as if it was a mere preference, but it actually
is a required change.
[Footnote]
*1* Well, it would have been ideal if the original patch had enough
information from the beginning to make this kind of "digging"
unnecessary ;-)
next prev parent reply other threads:[~2018-02-20 19:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 11:18 [PATCH] make hg-to-git compatible with python2.x and 3.x Hervé Beraud
2018-02-15 22:06 ` Junio C Hamano
2018-02-20 16:52 ` Hervé Beraud
2018-02-20 19:14 ` Junio C Hamano
2018-02-20 19:19 ` Junio C Hamano [this message]
2019-09-17 13:41 ` [PATCH] Rewrite feature to render " Hervé Beraud
2019-09-17 22:35 ` Junio C Hamano
2019-09-17 22:40 ` Junio C Hamano
2019-09-18 8:33 ` [PATCH v2] hg-to-git: make it compatible with both python3 and python2 Hervé Beraud
2019-09-18 17:21 ` Junio C Hamano
2019-09-18 17:55 ` [PATCH v3] " Hervé Beraud
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqsh9v31wa.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=herveberaud.pro@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).