mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Use string methods where possible, and remove import string
This commit is contained in:
parent
05ab2e693c
commit
7ce734cd72
3 changed files with 11 additions and 13 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue