def dep_wordreduce(mydeplist,mysettings,mydbapi,mode,use_cache=1):
"Reduces the deplist to ones and zeros"
deplist=mydeplist[:]
- for mypos in xrange(len(deplist)):
+ for mypos, token in enumerate(deplist):
if isinstance(deplist[mypos], list):
#recurse
deplist[mypos]=dep_wordreduce(deplist[mypos],mysettings,mydbapi,mode,use_cache=use_cache)
elif deplist[mypos]=="||":
pass
+ elif token[:1] == "!":
+ deplist[mypos] = False
else:
mykey = dep_getkey(deplist[mypos])
if mysettings and mykey in mysettings.pprovideddict and \