Commit 00a108d2 authored by Stefan Behnel's avatar Stefan Behnel

trivial Python code fixes in Plex

parent 62daa125
...@@ -258,7 +258,8 @@ class FastMachine: ...@@ -258,7 +258,8 @@ class FastMachine:
def ranges_to_string(self, range_list): def ranges_to_string(self, range_list):
return string.join(map(self.range_to_string, range_list), ",") return string.join(map(self.range_to_string, range_list), ",")
def range_to_string(self, (c1, c2)): def range_to_string(self, range_tuple):
(c1, c2) = range_tuple
if c1 == c2: if c1 == c2:
return repr(c1) return repr(c1)
else: else:
......
...@@ -122,7 +122,7 @@ class RE: ...@@ -122,7 +122,7 @@ class RE:
beginning of a line. If nocase is true, upper and lower case beginning of a line. If nocase is true, upper and lower case
letters should be treated as equivalent. letters should be treated as equivalent.
""" """
raise exceptions.UnimplementedMethod("%s.build_machine not implemented" % raise NotImplementedError("%s.build_machine not implemented" %
self.__class__.__name__) self.__class__.__name__)
def build_opt(self, m, initial_state, c): def build_opt(self, m, initial_state, c):
......
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