diff options
author | Guido van Rossum <guido@python.org> | 1997-12-24 21:18:41 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-12-24 21:18:41 (GMT) |
commit | 00f9fea288baed5a37e3866b492185b5045d30d4 (patch) | |
tree | 8ecf28e2d8907d52e18f10a66e582d5d3bda92d7 /Lib/mhlib.py | |
parent | b9b50eb7e09ec1b28e8549c2c90d7ed5748b3173 (diff) | |
download | cpython-00f9fea288baed5a37e3866b492185b5045d30d4.zip cpython-00f9fea288baed5a37e3866b492185b5045d30d4.tar.gz cpython-00f9fea288baed5a37e3866b492185b5045d30d4.tar.bz2 |
Use string.replace instead of regsub.[g]sub.
Diffstat (limited to 'Lib/mhlib.py')
-rw-r--r-- | Lib/mhlib.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/mhlib.py b/Lib/mhlib.py index 69a33ec..dc98712 100644 --- a/Lib/mhlib.py +++ b/Lib/mhlib.py @@ -773,7 +773,7 @@ class SubMessage(Message): # - the string used to initialize the set (default ''), # - the separator between ranges (default ',') # - the separator between begin and end of a range (default '-') -# The separators may be regular expressions and should be different. +# The separators must be strings (not regexprs) and should be different. # # The tostring() function yields a string that can be passed to another # IntSet constructor; __repr__() is a valid IntSet constructor itself. @@ -882,11 +882,11 @@ class IntSet: self.normalize() def fromstring(self, data): - import string, regsub + import string new = [] - for part in regsub.split(data, self.sep): + for part in string.splitfields(data, self.sep): list = [] - for subp in regsub.split(part, self.rng): + for subp in string.splitfields(part, self.rng): s = string.strip(subp) list.append(string.atoi(s)) if len(list) == 1: |