def _match(key, value, attrs):
 if (key not in attrs):
  return False
 if (value == '*'):
  return True
 if (key != 'objectclass'):
  return (value in attrs[key])
 values = _subs(value)
 for v in values:
  if (v in attrs[key]):
   return True
 return False

def _match ( key , value , attrs ) : if ( key not in attrs ) : return False if ( value == '*' ) : return True if ( key != 'objectclass' ) : return ( value in attrs [ key ] ) values = _subs ( value ) for v in values : if ( v in attrs [ key ] ) : return True return False
match a given key and value against an attribute list .