29 Jul
2001
29 Jul
'01
6:29 p.m.
Tim Hicks wrote:
def sort_id(ob1, ob2): return cmp(ob1.getID(), ob2.getID())
It seems that the cmp function needs to get hold of attributes, not methods. Even if I specifically call a method on ob1 or ob2, getattr seems to be called in there somewhere.
Any more clues?
try getId() instead of getID() Maarten.