summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-09 12:03:45 (GMT)
committerEric S. Raymond <esr@thyrsus.com>2001-02-09 12:03:45 (GMT)
commit83ff7498272c5f3acbda9b3cad0e2044ab7547c2 (patch)
treeabf864e31d01e45936b80e72d273d5abc7393eb2 /Lib
parent2846b0ab417dbfc76d2f9b52b5613ad4fe8feb63 (diff)
downloadcpython-83ff7498272c5f3acbda9b3cad0e2044ab7547c2.zip
cpython-83ff7498272c5f3acbda9b3cad0e2044ab7547c2.tar.gz
cpython-83ff7498272c5f3acbda9b3cad0e2044ab7547c2.tar.bz2
String method conversion.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_socket.py3
-rwxr-xr-xLib/test/test_strftime.py4
-rw-r--r--Lib/test/test_zlib.py5
-rw-r--r--Lib/xml/__init__.py4
4 files changed, 6 insertions, 10 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index fe37936..00a4a91 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -12,7 +12,6 @@ from test_support import verbose, TestFailed
import socket
import os
import time
-import string
def missing_ok(str):
try:
@@ -79,7 +78,7 @@ if verbose:
print all_host_names
for name in all_host_names:
- if string.find(name, '.'):
+ if name.find('.'):
break
else:
print 'FQDN not found'
diff --git a/Lib/test/test_strftime.py b/Lib/test/test_strftime.py
index 7f5cb80..fd024b9 100755
--- a/Lib/test/test_strftime.py
+++ b/Lib/test/test_strftime.py
@@ -2,7 +2,7 @@
# Sanity checker for time.strftime
-import time, calendar, sys, string, os, re
+import time, calendar, sys, os, re
from test_support import verbose
def main():
@@ -90,7 +90,7 @@ def strftest(now):
if verbose:
print "Strftime test, platform: %s, Python version: %s" % \
- (sys.platform, string.split(sys.version)[0])
+ (sys.platform, sys.version.split()[0])
for e in expectations:
try:
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py
index 7f01114..c672ef7 100644
--- a/Lib/test/test_zlib.py
+++ b/Lib/test/test_zlib.py
@@ -1,7 +1,6 @@
import zlib
import sys
import imp
-import string
try:
t = imp.find_module('test_zlib')
@@ -57,7 +56,7 @@ bufs = []
for i in range(0, len(buf), 256):
bufs.append(co.compress(buf[i:i+256]))
bufs.append(co.flush())
-combuf = string.join(bufs, '')
+combuf = ''.join(bufs)
decomp1 = zlib.decompress(combuf, -12, -5)
if decomp1 != buf:
@@ -70,7 +69,7 @@ bufs = []
for i in range(0, len(combuf), 128):
bufs.append(deco.decompress(combuf[i:i+128]))
bufs.append(deco.flush())
-decomp2 = string.join(buf, '')
+decomp2 = ''.join(buf)
if decomp2 != buf:
print "decompressobj with init options failed"
else:
diff --git a/Lib/xml/__init__.py b/Lib/xml/__init__.py
index 2748d50..b26d378 100644
--- a/Lib/xml/__init__.py
+++ b/Lib/xml/__init__.py
@@ -15,9 +15,7 @@ sax -- The Simple API for XML, developed by XML-Dev, led by David
__all__ = ["dom", "parsers", "sax"]
-import string
-__version__ = string.split("$Revision$")[1]
-del string
+__version__ = "$Revision$".split()[1]
_MINIMUM_XMLPLUS_VERSION = (0, 6, 1)