Fix Matcher.__contains__

This commit is contained in:
ines 2017-10-25 12:09:47 +02:00
parent 7bcec57462
commit 7eebeeaf85
1 changed files with 1 additions and 1 deletions

View File

@ -230,7 +230,7 @@ cdef class Matcher:
key (unicode): The match ID.
RETURNS (bool): Whether the matcher contains rules for this match ID.
"""
return len(self._patterns)
return key in self._patterns
def add(self, key, on_match, *patterns):
"""Add a match-rule to the matcher. A match-rule consists of: an ID key,