comparison mercurial/revsetlang.py @ 32291:bd872f64a8ba

cleanup: use set literals We no longer support Python 2.6, so we can now use set literals.
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 10 Feb 2017 16:56:29 -0800
parents 11f501f0a213
children c808507cfbf0
comparison
equal deleted inserted replaced
32290:2959c3e986e0 32291:bd872f64a8ba
42 "symbol": (0, "symbol", None, None, None), 42 "symbol": (0, "symbol", None, None, None),
43 "string": (0, "string", None, None, None), 43 "string": (0, "string", None, None, None),
44 "end": (0, None, None, None, None), 44 "end": (0, None, None, None, None),
45 } 45 }
46 46
47 keywords = set(['and', 'or', 'not']) 47 keywords = {'and', 'or', 'not'}
48 48
49 _quoteletters = set(['"', "'"]) 49 _quoteletters = {'"', "'"}
50 _simpleopletters = set(pycompat.iterbytestr("():=,-|&+!~^%")) 50 _simpleopletters = set(pycompat.iterbytestr("():=,-|&+!~^%"))
51 51
52 # default set of valid characters for the initial letter of symbols 52 # default set of valid characters for the initial letter of symbols
53 _syminitletters = set(pycompat.iterbytestr( 53 _syminitletters = set(pycompat.iterbytestr(
54 string.ascii_letters.encode('ascii') + 54 string.ascii_letters.encode('ascii') +