changeset 28834:2fac032c1269

pycompat: alias xrange to range in py3
author timeless <timeless@mozdev.org>
date Wed, 06 Apr 2016 22:35:52 +0000
parents 672fc23bf9cc
children 68a946e83188
files mercurial/pycompat.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/pycompat.py	Fri Apr 08 14:03:05 2016 +0000
+++ b/mercurial/pycompat.py	Wed Apr 06 22:35:52 2016 +0000
@@ -17,3 +17,9 @@
     import queue as _queue
 empty = _queue.Empty
 queue = _queue.Queue
+
+try:
+    xrange
+except NameError:
+    import builtins
+    builtins.xrange = range