def explode_dn(dn, notypes=0, flags=0):
 if (not dn):
  return []
 dn_decomp = str2dn(dn, flags)
 rdn_list = []
 for rdn in dn_decomp:
  if notypes:
   rdn_list.append('+'.join([escape_dn_chars((avalue or '')) for (atype, avalue, dummy) in rdn]))
  else:
   rdn_list.append('+'.join(['='.join((atype, escape_dn_chars((avalue or '')))) for (atype, avalue, dummy) in rdn]))
 return rdn_list

def explode_dn ( dn , notypes = 0 , flags = 0 ) : if ( not dn ) : return [ ] dn_decomp = str2dn ( dn , flags ) rdn_list = [ ] for rdn in dn_decomp : if notypes : rdn_list . append ( '+' . join ( [ escape_dn_chars ( ( avalue or '' ) ) for ( atype , avalue , dummy ) in rdn ] ) ) else : rdn_list . append ( '+' . join ( [ '=' . join ( ( atype , escape_dn_chars ( ( avalue or '' ) ) ) ) for ( atype , avalue , dummy ) in rdn ] ) ) return rdn_list
explode_dn -> list this function takes a dn and breaks it up into its component parts .