On Feb 17, 1:09 pm, Nils Bruin <nbr...@sfu.ca> wrote: > """ > User-defined classes have __cmp__() and __hash__() methods by default; > with them, all objects compare unequal (except with themselves) and > x.__hash__() returns id(x). > """ The Python documentation is plainly wrong on that one by the way:
sage: A=object() sage: hash(A) 8781527762730 sage: id(A) 140504444203680 sage: hash(A) << 4 == id (A) True -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.