mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +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
|
@ -8,7 +8,7 @@ from distutils import log
|
|||
|
||||
__revision__ = "$Id$"
|
||||
|
||||
import sys, os, string
|
||||
import sys, os
|
||||
from types import *
|
||||
from distutils.core import Command
|
||||
from distutils.debug import DEBUG
|
||||
|
@ -269,7 +269,7 @@ class install (Command):
|
|||
# $platbase in the other installation directories and not worry
|
||||
# about needing recursive variable expansion (shudder).
|
||||
|
||||
py_version = (string.split(sys.version))[0]
|
||||
py_version = sys.version.split()[0]
|
||||
(prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
|
||||
self.config_vars = {'dist_name': self.distribution.get_name(),
|
||||
'dist_version': self.distribution.get_version(),
|
||||
|
@ -353,11 +353,11 @@ class install (Command):
|
|||
if opt_name[-1] == "=":
|
||||
opt_name = opt_name[0:-1]
|
||||
if self.negative_opt.has_key(opt_name):
|
||||
opt_name = string.translate(self.negative_opt[opt_name],
|
||||
longopt_xlate)
|
||||
opt_name = self.negative_opt[opt_name].translate(
|
||||
longopt_xlate)
|
||||
val = not getattr(self, opt_name)
|
||||
else:
|
||||
opt_name = string.translate(opt_name, longopt_xlate)
|
||||
opt_name = opt_name.translate(longopt_xlate)
|
||||
val = getattr(self, opt_name)
|
||||
print(" %s: %s" % (opt_name, val))
|
||||
|
||||
|
@ -464,7 +464,7 @@ class install (Command):
|
|||
|
||||
if self.extra_path is not None:
|
||||
if type(self.extra_path) is StringType:
|
||||
self.extra_path = string.split(self.extra_path, ',')
|
||||
self.extra_path = self.extra_path.split(',')
|
||||
|
||||
if len(self.extra_path) == 1:
|
||||
path_file = extra_dirs = self.extra_path[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue