Use string methods where possible, and remove import string

This commit is contained in:
Neal Norwitz 2002-05-31 14:13:04 +00:00
parent 05ab2e693c
commit 7ce734cd72
3 changed files with 11 additions and 13 deletions

View file

@ -261,12 +261,11 @@ class Whitespace:
return a
def format_witnesses(w):
import string
firsts = map(lambda tup: str(tup[0]), w)
prefix = "at tab size"
if len(w) > 1:
prefix = prefix + "s"
return prefix + " " + string.join(firsts, ', ')
return prefix + " " + ', '.join(firsts)
def process_tokens(tokens):
INDENT = tokenize.INDENT