From: Stefan Behnel Date: Fri, 25 Apr 2008 18:07:53 +0000 (+0200) Subject: trivial Python code fixes in Plex X-Git-Tag: 0.9.6.14~20^2~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=00a108d2705789562a5a63cfd94186126bdfa9b9;p=cython.git trivial Python code fixes in Plex --- diff --git a/Cython/Plex/Machines.py b/Cython/Plex/Machines.py index 6adfa340..a37191a8 100644 --- a/Cython/Plex/Machines.py +++ b/Cython/Plex/Machines.py @@ -258,7 +258,8 @@ class FastMachine: def ranges_to_string(self, 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: return repr(c1) else: diff --git a/Cython/Plex/Regexps.py b/Cython/Plex/Regexps.py index d820f8c1..9adc9b03 100644 --- a/Cython/Plex/Regexps.py +++ b/Cython/Plex/Regexps.py @@ -122,7 +122,7 @@ class RE: beginning of a line. If nocase is true, upper and lower case letters should be treated as equivalent. """ - raise exceptions.UnimplementedMethod("%s.build_machine not implemented" % + raise NotImplementedError("%s.build_machine not implemented" % self.__class__.__name__) def build_opt(self, m, initial_state, c):