Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revsetlang.py @ 38823:e7aa113b14f7
global: use pycompat.xrange()
On Python 3, our module importer automatically rewrites xrange()
to pycompat.xrange().
We want to move away from the custom importer on Python 3.
This commit converts all instances of xrange() to use
pycompat.xrange().
Differential Revision: https://phab.mercurial-scm.org/D4032
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 01 Aug 2018 13:00:45 -0700 |
parents | 52f19a840543 |
children | b902b177901d |
comparison
equal
deleted
inserted
replaced
38822:7eba8f83129b | 38823:e7aa113b14f7 |
---|---|
61 | 61 |
62 # default set of valid characters for the initial letter of symbols | 62 # default set of valid characters for the initial letter of symbols |
63 _syminitletters = set(pycompat.iterbytestr( | 63 _syminitletters = set(pycompat.iterbytestr( |
64 string.ascii_letters.encode('ascii') + | 64 string.ascii_letters.encode('ascii') + |
65 string.digits.encode('ascii') + | 65 string.digits.encode('ascii') + |
66 '._@')) | set(map(pycompat.bytechr, xrange(128, 256))) | 66 '._@')) | set(map(pycompat.bytechr, pycompat.xrange(128, 256))) |
67 | 67 |
68 # default set of valid characters for non-initial letters of symbols | 68 # default set of valid characters for non-initial letters of symbols |
69 _symletters = _syminitletters | set(pycompat.iterbytestr('-/')) | 69 _symletters = _syminitletters | set(pycompat.iterbytestr('-/')) |
70 | 70 |
71 def tokenize(program, lookup=None, syminitletters=None, symletters=None): | 71 def tokenize(program, lookup=None, syminitletters=None, symletters=None): |