equal
deleted
inserted
replaced
676 r |= v |
676 r |= v |
677 return r |
677 return r |
678 |
678 |
679 def __repr__(self): |
679 def __repr__(self): |
680 return ('<unionmatcher matchers=%r>' % self._matchers) |
680 return ('<unionmatcher matchers=%r>' % self._matchers) |
681 |
|
682 class negatematcher(basematcher): |
|
683 def __init__(self, matcher): |
|
684 self._matcher = matcher |
|
685 |
|
686 def matchfn(self, f): |
|
687 return not self._matcher(f) |
|
688 |
|
689 def __repr__(self): |
|
690 return ('<negatematcher matcher=%r>' % self._matcher) |
|
691 |
681 |
692 def patkind(pattern, default=None): |
682 def patkind(pattern, default=None): |
693 '''If pattern is 'kind:pat' with a known kind, return kind.''' |
683 '''If pattern is 'kind:pat' with a known kind, return kind.''' |
694 return _patsplit(pattern, default)[0] |
684 return _patsplit(pattern, default)[0] |
695 |
685 |