def compareAttributeKeyAscending(key, otherKey):
 if (key == 'id'):
  return (-1)
 if (otherKey == 'id'):
  return 1
 if (key == 'name'):
  return (-1)
 if (otherKey == 'name'):
  return 1
 if (key < otherKey):
  return (-1)
 return int((key > otherKey))

def compareAttributeKeyAscending ( key , otherKey ) : if ( key == 'id' ) : return ( - 1 ) if ( otherKey == 'id' ) : return 1 if ( key == 'name' ) : return ( - 1 ) if ( otherKey == 'name' ) : return 1 if ( key < otherKey ) : return ( - 1 ) return int ( ( key > otherKey ) )
get comparison in order to sort attribute keys in ascending order .