From: Eric S. Raymond Date: Sat, 10 Feb 2001 00:06:00 +0000 (+0000) Subject: String method cleanup. X-Git-Tag: v2.1b1~420 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c8c6aa201f03393ada787a1bde88cd2092d2361c;p=python String method cleanup. --- diff --git a/Lib/binhex.py b/Lib/binhex.py index 5137ccf956..25e534957f 100644 --- a/Lib/binhex.py +++ b/Lib/binhex.py @@ -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'