[PATCH 1 of 4] pycompat: name maplist() and ziplist() for better traceback message

Yuya Nishihara yuya at tcha.org
Tue Mar 13 13:55:09 UTC 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1520943734 -32400
#      Tue Mar 13 21:22:14 2018 +0900
# Node ID aa35c6d7caef9ef9f48d0c9c831f9492c1421c45
# Parent  6aeb076b1321c540db6419fc48c8a3a552fb596b
pycompat: name maplist() and ziplist() for better traceback message

diff --git a/mercurial/pycompat.py b/mercurial/pycompat.py
--- a/mercurial/pycompat.py
+++ b/mercurial/pycompat.py
@@ -65,8 +65,13 @@ if ispy3:
     if sysexecutable:
         sysexecutable = os.fsencode(sysexecutable)
     stringio = io.BytesIO
-    maplist = lambda *args: list(map(*args))
-    ziplist = lambda *args: list(zip(*args))
+
+    def maplist(*args):
+        return list(map(*args))
+
+    def ziplist(*args):
+        return list(zip(*args))
+
     rawinput = input
     getargspec = inspect.getfullargspec
 


More information about the Mercurial-devel mailing list