]> git.lyx.org Git - features.git/commitdiff
parser_tools.py (find_tokens, find_tokens_exact): replace range with xrange.
authorJosé Matox <jamatos@lyx.org>
Mon, 10 Apr 2006 15:50:31 +0000 (15:50 +0000)
committerJosé Matox <jamatos@lyx.org>
Mon, 10 Apr 2006 15:50:31 +0000 (15:50 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13625 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/parser_tools.py

index d857e2287c5e6498b43b79a9ebf5e8dffee87787..a4af43fec5da19c259d996cd92e140da5ac41cf1 100644 (file)
@@ -53,7 +53,7 @@ def find_token_exact(lines, token, start, end = 0):
 def find_tokens(lines, tokens, start, end = 0):
     if end == 0:
        end = len(lines)
-    for i in range(start, end):
+    for i in xrange(start, end):
        for token in tokens:
            if lines[i][:len(token)] == token:
                return i
@@ -63,7 +63,7 @@ def find_tokens(lines, tokens, start, end = 0):
 def find_tokens_exact(lines, tokens, start, end = 0):
     if end == 0:
        end = len(lines)
-    for i in range(start, end):
+    for i in xrange(start, end):
         for token in tokens:
             x = string.split(lines[i])
             y = string.split(token)