> You'll need __eq__ for testing if two objects are equivalent, and > __hash__ for calculating object's hash value. > > class Type: > def __init__(self, val): > self.val = val > > def __eq__(self, other): > return self.val == other.val > > def __hash__(self): > return hash(self.val)
that's exactly what I needed, thanks. -- http://mail.python.org/mailman/listinfo/python-list