Patchwork D1560: py3: alias xrange to range in tests/seq.py

login
register
mail settings
Submitter phabricator
Date Nov. 29, 2017, 11:10 p.m.
Message ID <differential-rev-PHID-DREV-x6vk2s22wxyf3n3duzju-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/25817/
State Superseded
Headers show

Comments

phabricator - Nov. 29, 2017, 11:10 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/seq.py

CHANGE DETAILS




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

Patch

diff --git a/tests/seq.py b/tests/seq.py
--- a/tests/seq.py
+++ b/tests/seq.py
@@ -10,6 +10,9 @@ 
 from __future__ import absolute_import, print_function
 import sys
 
+if sys.version_info[0] >= 3:
+    xrange = range
+
 start = 1
 if len(sys.argv) > 2:
     start = int(sys.argv[1])