compare_to method

compare_to

Compares the current instance with another object of the same type.

Returns

A 32-bit integer that indicates the relative order of the comparands. The return value has these meanings:

  • < 0 - This instance is less than obj. = 0 - This instance is equal to obj. > 0 - This instance is greater than obj.

  • < 0 - This instance is less than obj. = 0 - This instance is equal to obj. > 0 - This instance is greater than obj.

  • < 0 - This instance is less than obj. = 0 - This instance is equal to obj. > 0 - This instance is greater than obj.

def compare_to(self, obj):
    ...
ParameterTypeDescription
objanyAn object to compare with this instance.

See Also