def is_rdn_equal(rdn1, rdn2):
 if (len(rdn1) != len(rdn2)):
  return False
 for (attr_type_1, val1, dummy) in rdn1:
  found = False
  for (attr_type_2, val2, dummy) in rdn2:
   if (attr_type_1.lower() != attr_type_2.lower()):
    continue
   found = True
   if (not is_ava_value_equal(attr_type_1, val1, val2)):
    return False
   break
  if (not found):
   return False
 return True

def is_rdn_equal ( rdn1 , rdn2 ) : if ( len ( rdn1 ) != len ( rdn2 ) ) : return False for ( attr_type_1 , val1 , dummy ) in rdn1 : found = False for ( attr_type_2 , val2 , dummy ) in rdn2 : if ( attr_type_1 . lower ( ) != attr_type_2 . lower ( ) ) : continue found = True if ( not is_ava_value_equal ( attr_type_1 , val1 , val2 ) ) : return False break if ( not found ) : return False return True
return true if and only if the rdns are equal .