]> granicus.if.org Git - python/commitdiff
String method conversion.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 9 Feb 2001 12:03:45 +0000 (12:03 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 9 Feb 2001 12:03:45 +0000 (12:03 +0000)
Lib/test/test_socket.py
Lib/test/test_strftime.py
Lib/test/test_zlib.py
Lib/xml/__init__.py

index fe3793615d202a317e8b1229f2efc235f872bc1b..00a4a9121390203adb14a1bbdd78e3b33ff28799 100644 (file)
@@ -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'
index 7f5cb8035e4451e375d96c27a4659061beed9b66..fd024b986a529f47d9f30c1d79cb1e23e78b71dd 100755 (executable)
@@ -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:
index 7f011141a088435c32ee173a147f031eee8a8a1a..c672ef7c666df361489d6ca5e805f4fbf41e2ea9 100644 (file)
@@ -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:
index 2748d50b6c47334e68aab4a5618bc9d5d184577c..b26d378cfe691c8fa40df4b98fe9769217c2f534 100644 (file)
@@ -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)