def description ( self ):
        """ Returns a user-readable description of the kind of object that
            satisfies the filter.
        """
        ors  = []
        ands = []
        if len( self.rules ) > 0:
            for rule in self.rules:
                if rule.and_or == 'or':
                    if len( ands ) > 0:
                        ors.append( ' and '.join( ands ) )
                        ands = []
                ands.append( rule.description() )

        if len( ands ) > 0:
            ors.append( ' and '.join( ands ) )

        if len( ors ) == 1:
            return ors[0]

        if len( ors ) > 1:
            return ' or '.join( [ '(%s)' % t for t in ors ] )

        return super( RuleTableFilter, self ).description()

    #---------------------------------------------------------------------------
    #  Edits the contents of the filter:
    #---------------------------------------------------------------------------
dataset/ETHPy150Open enthought/traitsui/traitsui/table_filter.py/RuleTableFilter.description/original