SF patch #852140: keyword.py - use __contains__ and bool
Use a set instead of dict with values equal to one.
This commit is contained in:
parent
25695282a5
commit
70ef8692a1
|
@ -46,11 +46,7 @@ kwlist = [
|
|||
#--end keywords--
|
||||
]
|
||||
|
||||
kwdict = {}
|
||||
for keyword in kwlist:
|
||||
kwdict[keyword] = 1
|
||||
|
||||
iskeyword = kwdict.has_key
|
||||
iskeyword = frozenset(kwlist).__contains__
|
||||
|
||||
def main():
|
||||
import sys, re
|
||||
|
|
Loading…
Reference in New Issue