Patchwork D6443: py3: use range() instead of xrange()

login
register
mail settings
Submitter phabricator
Date May 24, 2019, 12:42 p.m.
Message ID <differential-rev-PHID-DREV-ipbmzg2jradpdw6igewj-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/40224/
State Superseded
Headers show

Comments

phabricator - May 24, 2019, 12:42 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The latter does not exist on Python 3. This makes test-contrib-perf.t pass on
  Python 3 again.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  contrib/perf.py

CHANGE DETAILS




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

Patch

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -408,7 +408,7 @@ 
     count = 0
     if profiler is None:
         profiler = NOOPCTX
-    for i in xrange(prerun):
+    for i in range(prerun):
         if setup is not None:
             setup()
         func()