def __init__(self, regexes):
"""
Initializes a newly created Filter with the given list of
:class:`re.RegexObject`.
*regexes* is a list of :class:`re.RegexObject`s.
Raises :class:`exceptions.ValueError` if the given list evaluates to
False (empty list, None, ...)
"""
if regexes:
list.__init__(self, regexes)
else:
raise ValueError("Unable to initialize a Filter without at least "
"one valid pattern, please fix your config file")
评论列表
文章目录