equal
deleted
inserted
replaced
105 |
105 |
106 def notset(mctx, x): |
106 def notset(mctx, x): |
107 s = set(getset(mctx, x)) |
107 s = set(getset(mctx, x)) |
108 return [r for r in mctx.subset if r not in s] |
108 return [r for r in mctx.subset if r not in s] |
109 |
109 |
|
110 def minusset(mctx, x, y): |
|
111 xl = getset(mctx, x) |
|
112 yl = set(getset(mctx, y)) |
|
113 return [f for f in xl if f not in yl] |
|
114 |
110 def listset(mctx, a, b): |
115 def listset(mctx, a, b): |
111 raise error.ParseError(_("can't use a list in this context")) |
116 raise error.ParseError(_("can't use a list in this context")) |
112 |
117 |
113 def modified(mctx, x): |
118 def modified(mctx, x): |
114 """``modified()`` |
119 """``modified()`` |
404 methods = { |
409 methods = { |
405 'string': stringset, |
410 'string': stringset, |
406 'symbol': stringset, |
411 'symbol': stringset, |
407 'and': andset, |
412 'and': andset, |
408 'or': orset, |
413 'or': orset, |
|
414 'minus': minusset, |
409 'list': listset, |
415 'list': listset, |
410 'group': getset, |
416 'group': getset, |
411 'not': notset, |
417 'not': notset, |
412 'func': func, |
418 'func': func, |
413 } |
419 } |