Changeset 3679
- Timestamp:
- 05/06/08 12:13:02 (7 months ago)
- Files:
-
- trunk/Gtk/schevogtk2/relatedgrid.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Gtk/schevogtk2/relatedgrid.py
r3306 r3679 26 26 self.field_label = label(extent.field_spec.field_map()[field_name]) 27 27 28 def __cmp__(self, other): 29 if other.__class__ is self.__class__: 30 return cmp((self.plural, self.field_label), 31 (other.plural, other.field_label)) 32 else: 33 return cmp(hash(self), hash(other)) 34 28 35 def __len__(self): 29 36 return self.entity.sys.count(self.extent.name, self.field_name) 37 38 def __repr__(self): 39 return '%s %s %s' % (self.entity, self.extent, self.field_name) 30 40 31 41
