Skip to content

Commit 64edfe1

Browse files
String method cleanup.
1 parent b6aa64b commit 64edfe1

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Lib/binhex.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import sys
2525
import os
2626
import struct
27-
import string
2827
import binascii
2928

3029
__all__ = ["binhex","hexbin","Error"]
@@ -93,8 +92,7 @@ def getfileinfo(name):
9392
fp = open(name)
9493
data = open(name).read(256)
9594
for c in data:
96-
if not c in string.whitespace \
97-
and (c<' ' or ord(c) > 0177):
95+
if not c.isspace() and (c<' ' or ord(c) > 0177):
9896
break
9997
else:
10098
finfo.Type = 'TEXT'

0 commit comments

Comments
 (0)