From 00a108d2705789562a5a63cfd94186126bdfa9b9 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 25 Apr 2008 20:07:53 +0200 Subject: [PATCH] trivial Python code fixes in Plex --- Cython/Plex/Machines.py | 3 ++- Cython/Plex/Regexps.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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): -- 2.26.2