[gtk.types.Ordering.Smaller] if item1 < item2, [gtk.types.Ordering.Larger] if item1 > item2
Sorter.compare
gtk.types.Ordering compare(gobject.object.ObjectWrap item1, gobject.object.ObjectWrap item2)Compares two given items according to the sort order implemented by the sorter.
Sorters implement a partial order:
- It is reflexive, ie a = a
- It is antisymmetric, ie if a < b and b < a, then a = b
- It is transitive, ie given any 3 items with a ≤ b and b ≤ c,
then a ≤ c
The sorter may signal it conforms to additional constraints via the return value of [gtk.sorter.Sorter.getOrder].
Parameters
item1 | first item to compare |
item2 | second item to compare |
Returns
[gtk.types.Ordering.Equal] if item1 == item2,