On Fri, 11 Oct 2002 16:37:23 +0100, Gonçalo Rodrigues <op73418 at mail.telepac.pt> wrote: >def __hash__(self): > return hash(self.__time) This is the perfect way to do it. You are relying on the built in hash() function, and because it is used in every Python dictionary, it is optimized to be fast with no trivial pathological behavior.