Kaydet (Commit) 57aef9cb authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Remove outdated references to the regsub module.

üst a6b45cc3
...@@ -177,7 +177,6 @@ class AbstractFormatter: ...@@ -177,7 +177,6 @@ class AbstractFormatter:
def add_flowing_data(self, data): def add_flowing_data(self, data):
if not data: return if not data: return
# The following looks a bit convoluted but is a great improvement over # The following looks a bit convoluted but is a great improvement over
# data = regsub.gsub('[' + string.whitespace + ']+', ' ', data)
prespace = data[:1].isspace() prespace = data[:1].isspace()
postspace = data[-1:].isspace() postspace = data[-1:].isspace()
data = " ".join(data.split()) data = " ".join(data.split())
......
...@@ -43,7 +43,6 @@ del l ...@@ -43,7 +43,6 @@ del l
# Functions which aren't available as string methods. # Functions which aren't available as string methods.
# Capitalize the words in a string, e.g. " aBc dEf " -> "Abc Def". # Capitalize the words in a string, e.g. " aBc dEf " -> "Abc Def".
# See also regsub.capwords().
def capwords(s, sep=None): def capwords(s, sep=None):
"""capwords(s, [sep]) -> string """capwords(s, [sep]) -> string
...@@ -78,7 +77,7 @@ def maketrans(fromstr, tostr): ...@@ -78,7 +77,7 @@ def maketrans(fromstr, tostr):
return ''.join(L) return ''.join(L)
#################################################################### ####################################################################
import re as _re import re as _re
...@@ -205,7 +204,7 @@ class Template: ...@@ -205,7 +204,7 @@ class Template:
return self.pattern.sub(convert, self.template) return self.pattern.sub(convert, self.template)
#################################################################### ####################################################################
# NOTE: Everything below here is deprecated. Use string methods instead. # NOTE: Everything below here is deprecated. Use string methods instead.
# This stuff will go away in Python 3.0. # This stuff will go away in Python 3.0.
......
...@@ -363,7 +363,6 @@ def capitalize(s): ...@@ -363,7 +363,6 @@ def capitalize(s):
return s.capitalize() return s.capitalize()
# Capitalize the words in a string, e.g. " aBc dEf " -> "Abc Def". # Capitalize the words in a string, e.g. " aBc dEf " -> "Abc Def".
# See also regsub.capwords().
def capwords(s, sep=None): def capwords(s, sep=None):
"""capwords(s, [sep]) -> string """capwords(s, [sep]) -> string
......
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