'Adds a key to this bloom filter.
If the key already exists in this filter it will return False (because
it failed to add it to the filter). Otherwise True.
>>> b = ScalableBloomFilter(initial_capacity=100, error_rate=0.001,                                     mode=ScalableBloomFilter.SMALL_SET_GROWTH)
>>> b.add("hello")
True
>>> b.add("hello")
False'

def add(self, key):

    if (key in self):
        return False
    _filter = (self.filters[(-1)] if self.filters else None)
    if ((_filter is None) or (len(_filter) >= _filter.capacity)):
        num_filters = len(self.filters)
        new_capacity = (self.initial_capacity * (self.scale ** num_filters))
        new_error_rate = (self.error_rate * (self.ratio ** num_filters))
        _filter = self.filter_impl(capacity=new_capacity, error_rate=new_error_rate)
        self.filters.append(_filter)
    _filter.add(key)
    return True
