Commits

Martin Geisler committed f0c0b7f

Shorter lines.

Comments (0)

Files changed (1)

revspec/revspec.py

                 pos += 1
                 continue
 
-            if data[pos] == '.' and pos + 1 < len(data) and data[pos + 1] == '.':
+            if data[pos:pos + 2] == '..':
                 pos += 2
                 self.token(TokenDOTDOT(self))
                 continue
                     s += data[pos]
                     pos += 1
                     if s[-1] == s[0] and s[-2] != '\\':
-                        self.token(TokenSTRING(self, s[1:-1].decode('string-escape')))
+                        decoded = s[1:-1].decode('string-escape')
+                        self.token(TokenSTRING(self, decoded))
                         s = None
                         break
 
                 continue
 
             ident = ''
-            while pos < len(data) and not data[pos].isspace() and not data[pos] in simple_tokens:
+            while (pos < len(data) and
+                   not data[pos].isspace() and
+                   not data[pos] in simple_tokens):
                 ident += data[pos]
                 pos += 1