def search_with_additional_terms(self, term_dict, escape=True):
term_strings = [self.filterstr]<EOL>for name, value in term_dict.items():<EOL><INDENT>if escape:<EOL><INDENT>value = self.ldap.filter.escape_filter_chars(value)<EOL><DEDENT>term_strings.append(u'<STR_LIT>' % (name, value))<EOL><DEDENT>filterstr = u'<STR_LIT>' % '<STR_LIT>'.join(term_strings)<EOL>return self.__class__(self.base_dn, self.scope, filterstr)<EOL>
Returns a new search object with additional search terms and-ed to the
filter string. term_dict maps attribute names to assertion values. If
you don't want the values escaped, pass escape=False.