'For example, filter for small pets with tails or wings
(which is not the same as small pets with tails or pets with wings):
>>> FilterChain(
>>>     filter("type", "pet"),
>>>     filter("weight", (4,6), ":"),
>>>     FilterChain(
>>>         filter("tail", True),
>>>         filter("wing", True), operator=OR))
Yields:
"type=\'pet\' and weight between 4 and 6 and (tail=1 or wing=1)"'

def SQL(self, **kwargs):

    a = []
    for filter in self:
        if isinstance(filter, FilterChain):
            a.append(('(%s)' % filter.SQL(**kwargs)))
            continue
        if isinstance(filter, (Filter, list, tuple)):
            a.append(cmp(*filter, **kwargs))
            continue
        raise TypeError(('FilterChain    can    contain    other    FilterChain    or    filter(),    not    %s' % type(filter)))
    return ('    %s    ' % self.operator).join(a)
