GData.Comparable¶
- Implementations:
GData.Author,GData.Category,GData.DocumentsProperty,GData.GContactCalendar,GData.GContactExternalID,GData.GContactLanguage,GData.GContactWebsite,GData.GDEmailAddress,GData.GDIMAddress,GData.GDName,GData.GDOrganization,GData.GDPhoneNumber,GData.GDPostalAddress,GData.GDReminder,GData.GDWhen,GData.GDWhere,GData.GDWho,GData.Generator,GData.Link
Methods¶
|
Virtual Methods¶
|
Properties¶
None
Signals¶
None
Fields¶
None
Class Details¶
- class GData.Comparable¶
- Bases:
- Structure:
All the fields in the
GData.Comparablestructure are private and should never be accessed directly.New in version 0.7.0.
- compare(other)¶
- Parameters:
other (
GData.ComparableorNone) – anotherGData.Comparableof the same type, orNone- Returns:
- Return type:
Compares the two objects, returning -1 if self is “less than” other by some metric, 0 if they’re equal, or 1 if self is “greater than” other.
Nonevalues are handled gracefully, with 0 returned if both self and other areNone,-1 if self is
Noneand 1 if other isNone. The other object must be of the same type as self, or of a type derived from self's type.New in version 0.7.0.
- do_compare_with(other) virtual¶
- Parameters:
other (
GData.Comparable) –- Return type:
compares the object with an other object of the same type, returning -1 if the object is “less than” the other object, 0 if they’re equal, or 1 if the object is “greater than” the other. The function can assume that neither self or other will be
None, and that both have correct types. The function must be pure.