Use set() instead of sets.Set()

This commit is contained in:
Raymond Hettinger 2004-07-12 13:29:10 +00:00
parent d7c7115926
commit 7b7acd1de5
1 changed files with 2 additions and 3 deletions

View File

@ -23,7 +23,6 @@ Options:
""" """
import re import re
import sets
import sys import sys
import getopt import getopt
from itertools import izip, count, islice from itertools import izip, count, islice
@ -87,7 +86,7 @@ def checkit(source, opts, morecmds=[]):
texcmd = re.compile(r'\\[A-Za-z]+') texcmd = re.compile(r'\\[A-Za-z]+')
falsetexcmd = re.compile(r'\/([A-Za-z]+)') # Mismarked with forward slash falsetexcmd = re.compile(r'\/([A-Za-z]+)') # Mismarked with forward slash
validcmds = sets.Set(cmdstr.split()) validcmds = set(cmdstr.split())
for cmd in morecmds: for cmd in morecmds:
validcmds.add('\\' + cmd) validcmds.add('\\' + cmd)
@ -95,7 +94,7 @@ def checkit(source, opts, morecmds=[]):
pairmap = {']':'[(', ')':'(['} # Munged openers pairmap = {']':'[(', ')':'(['} # Munged openers
else: else:
pairmap = {']':'[', ')':'('} # Normal opener for a given closer pairmap = {']':'[', ')':'('} # Normal opener for a given closer
openpunct = sets.Set('([') # Set of valid openers openpunct = set('([') # Set of valid openers
delimiters = re.compile(r'\\(begin|end){([_a-zA-Z]+)}|([()\[\]])') delimiters = re.compile(r'\\(begin|end){([_a-zA-Z]+)}|([()\[\]])')
braces = re.compile(r'({)|(})') braces = re.compile(r'({)|(})')