]> granicus.if.org Git - python/commitdiff
String method cleanup.
authorEric S. Raymond <esr@thyrsus.com>
Sat, 10 Feb 2001 00:06:00 +0000 (00:06 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Sat, 10 Feb 2001 00:06:00 +0000 (00:06 +0000)
Lib/binhex.py

index 5137ccf95624d8b19585bd5438ceeae5a6195fc0..25e534957f56feda03553c238faaf93f9e3e4f73 100644 (file)
@@ -24,7 +24,6 @@ hexbin(inputfilename, outputfilename)
 import sys
 import os
 import struct
-import string
 import binascii
 
 __all__ = ["binhex","hexbin","Error"]
@@ -93,8 +92,7 @@ else:
         fp = open(name)
         data = open(name).read(256)
         for c in data:
-            if not c in string.whitespace \
-                and (c<' ' or ord(c) > 0177):
+            if not c.isspace() and (c<' ' or ord(c) > 0177):
                 break
         else:
             finfo.Type = 'TEXT'