'constructor, use variable of BloomFilter if capacity else variable of set'

def __init__(self, black_patterns=(CONFIG_URLPATTERN_ALL,), white_patterns=('^http',), capacity=None):

    self._re_black_list = ([re.compile(pattern, flags=re.IGNORECASE) for pattern in black_patterns] if black_patterns else [])
    self._re_white_list = ([re.compile(pattern, flags=re.IGNORECASE) for pattern in white_patterns] if white_patterns else [])
    self._url_set = (set() if (not capacity) else None)
    self._bloom_filter = (pybloom_live.ScalableBloomFilter(capacity, error_rate=0.001) if capacity else None)
    return
