def add(self, item):
    'Override to not continue on encountering items.'
    if (item in self.stop_list):
        raise StopIteration
    else:
        super(AddStopList, self).add(item)
Override to not continue on encountering items.
def add(self, item):
    
    if (item in self.stop_list):
        raise StopIteration
    else:
        super(AddStopList, self).add(item)