Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 57aef9c

Browse files
committed
Remove outdated references to the regsub module.
1 parent a6b45cc commit 57aef9c

3 files changed

Lines changed: 2 additions & 5 deletions

File tree

Lib/formatter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ def format_roman(self, case, counter):
177177
def add_flowing_data(self, data):
178178
if not data: return
179179
# The following looks a bit convoluted but is a great improvement over
180-
# data = regsub.gsub('[' + string.whitespace + ']+', ' ', data)
181180
prespace = data[:1].isspace()
182181
postspace = data[-1:].isspace()
183182
data = " ".join(data.split())

Lib/string.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
# Functions which aren't available as string methods.
4444

4545
# Capitalize the words in a string, e.g. " aBc dEf " -> "Abc Def".
46-
# See also regsub.capwords().
4746
def capwords(s, sep=None):
4847
"""capwords(s, [sep]) -> string
4948
@@ -78,7 +77,7 @@ def maketrans(fromstr, tostr):
7877
return ''.join(L)
7978

8079

81-
80+
8281
####################################################################
8382
import re as _re
8483

@@ -205,7 +204,7 @@ def convert(mo):
205204
return self.pattern.sub(convert, self.template)
206205

207206

208-
207+
209208
####################################################################
210209
# NOTE: Everything below here is deprecated. Use string methods instead.
211210
# This stuff will go away in Python 3.0.

Lib/stringold.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ def capitalize(s):
363363
return s.capitalize()
364364

365365
# Capitalize the words in a string, e.g. " aBc dEf " -> "Abc Def".
366-
# See also regsub.capwords().
367366
def capwords(s, sep=None):
368367
"""capwords(s, [sep]) -> string
369368

0 commit comments

Comments
 (0)