changeset 31501:a1e40ceee640

pycompat: add maplist alias for old map behavior
author Augie Fackler <augie@google.com>
date Sun, 19 Mar 2017 14:12:38 -0400
parents bc315e669a32
children 9916b3d579a9
files mercurial/pycompat.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/pycompat.py	Sun Mar 19 14:23:30 2017 -0400
+++ b/mercurial/pycompat.py	Sun Mar 19 14:12:38 2017 -0400
@@ -57,6 +57,7 @@
     if sysexecutable:
         sysexecutable = os.fsencode(sysexecutable)
     stringio = io.BytesIO
+    maplist = lambda *args: list(map(*args))
 
     # TODO: .buffer might not exist if std streams were replaced; we'll need
     # a silly wrapper to make a bytes stream backed by a unicode one.
@@ -251,6 +252,7 @@
     sysexecutable = sys.executable
     shlexsplit = shlex.split
     stringio = cStringIO.StringIO
+    maplist = map
 
 empty = _queue.Empty
 queue = _queue.Queue