mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Remove functions in string module that are also string methods. Also remove:
* all calls to functions in the string module (except maketrans) * everything from stropmodule except for maketrans() which is still used
This commit is contained in:
parent
ff11334927
commit
9d72bb452b
69 changed files with 396 additions and 2113 deletions
|
@ -13,7 +13,7 @@ this header file lives".
|
|||
|
||||
__revision__ = "$Id$"
|
||||
|
||||
import sys, os, string, re
|
||||
import sys, os, re
|
||||
from types import *
|
||||
from distutils.core import Command
|
||||
from distutils.errors import DistutilsExecError
|
||||
|
@ -74,7 +74,7 @@ class config (Command):
|
|||
if self.include_dirs is None:
|
||||
self.include_dirs = self.distribution.include_dirs or []
|
||||
elif type(self.include_dirs) is StringType:
|
||||
self.include_dirs = string.split(self.include_dirs, os.pathsep)
|
||||
self.include_dirs = self.include_dirs.split(os.pathsep)
|
||||
|
||||
if self.libraries is None:
|
||||
self.libraries = []
|
||||
|
@ -84,7 +84,7 @@ class config (Command):
|
|||
if self.library_dirs is None:
|
||||
self.library_dirs = []
|
||||
elif type(self.library_dirs) is StringType:
|
||||
self.library_dirs = string.split(self.library_dirs, os.pathsep)
|
||||
self.library_dirs = self.library_dirs.split(os.pathsep)
|
||||
|
||||
|
||||
def run (self):
|
||||
|
@ -163,7 +163,7 @@ class config (Command):
|
|||
if not filenames:
|
||||
filenames = self.temp_files
|
||||
self.temp_files = []
|
||||
log.info("removing: %s", string.join(filenames))
|
||||
log.info("removing: %s", ' '.join(filenames))
|
||||
for filename in filenames:
|
||||
try:
|
||||
os.remove(filename)
|
||||
|
@ -322,7 +322,7 @@ class config (Command):
|
|||
else:
|
||||
body.append(" %s;" % func)
|
||||
body.append("}")
|
||||
body = string.join(body, "\n") + "\n"
|
||||
body = "\n".join(body) + "\n"
|
||||
|
||||
return self.try_link(body, headers, include_dirs,
|
||||
libraries, library_dirs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue