mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
parser_tools.py (find_tokens, find_tokens_exact): replace range with xrange.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13625 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e6c2e24dc8
commit
bb23ef468d
@ -53,7 +53,7 @@ def find_token_exact(lines, token, start, end = 0):
|
|||||||
def find_tokens(lines, tokens, start, end = 0):
|
def find_tokens(lines, tokens, start, end = 0):
|
||||||
if end == 0:
|
if end == 0:
|
||||||
end = len(lines)
|
end = len(lines)
|
||||||
for i in range(start, end):
|
for i in xrange(start, end):
|
||||||
for token in tokens:
|
for token in tokens:
|
||||||
if lines[i][:len(token)] == token:
|
if lines[i][:len(token)] == token:
|
||||||
return i
|
return i
|
||||||
@ -63,7 +63,7 @@ def find_tokens(lines, tokens, start, end = 0):
|
|||||||
def find_tokens_exact(lines, tokens, start, end = 0):
|
def find_tokens_exact(lines, tokens, start, end = 0):
|
||||||
if end == 0:
|
if end == 0:
|
||||||
end = len(lines)
|
end = len(lines)
|
||||||
for i in range(start, end):
|
for i in xrange(start, end):
|
||||||
for token in tokens:
|
for token in tokens:
|
||||||
x = string.split(lines[i])
|
x = string.split(lines[i])
|
||||||
y = string.split(token)
|
y = string.split(token)
|
||||||
|
Loading…
Reference in New Issue
Block a user