Commit 01af8155 authored by Stefan Behnel's avatar Stefan Behnel

avoid redundant Python type conversion in scanner

parent 599b26e7
......@@ -138,8 +138,8 @@ class Scanner(object):
if self.trace:
print("Scanner: read: Performing %s %d:%d" % (
action, self.start_pos, self.cur_pos))
base = self.buf_start_pos
text = self.buffer[self.start_pos - base : self.cur_pos - base]
text = self.buffer[self.start_pos - self.buf_start_pos :
self.cur_pos - self.buf_start_pos]
return (text, action)
else:
if self.cur_pos == self.start_pos:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment