Patchwork D1675: py3: introduce pycompat.ziplist as zip is a generator on Python 3

login
register
mail settings
Submitter phabricator
Date Dec. 13, 2017, 1:05 p.m.
Message ID <ab0ac11f2d2a8031f50cdc7e54374c2f@localhost.localdomain>
Download mbox | patch
Permalink /patch/26268/
State Not Applicable
Headers show

Comments

phabricator - Dec. 13, 2017, 1:05 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa4f655d1161b: py3: introduce pycompat.ziplist as zip is a generator on Python 3 (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1675?vs=4400&id=4423

REVISION DETAIL
  https://phab.mercurial-scm.org/D1675

AFFECTED FILES
  mercurial/pycompat.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, yuja
Cc: mercurial-devel

Patch

diff --git a/mercurial/pycompat.py b/mercurial/pycompat.py
--- a/mercurial/pycompat.py
+++ b/mercurial/pycompat.py
@@ -63,6 +63,7 @@ 
         sysexecutable = os.fsencode(sysexecutable)
     stringio = io.BytesIO
     maplist = lambda *args: list(map(*args))
+    ziplist = lambda *args: list(zip(*args))
     rawinput = input
 
     # TODO: .buffer might not exist if std streams were replaced; we'll need
@@ -313,6 +314,7 @@ 
     shlexsplit = shlex.split
     stringio = cStringIO.StringIO
     maplist = map
+    ziplist = zip
     rawinput = raw_input
 
 isjython = sysplatform.startswith('java')