I was going to file a bug report for this, but then I wondered if it was considered normal behaviour. Am I wrong in thinking there should be a better error message?
>>> class NoHash: ... def __hash__(self): ... pass ... >>> frozenset([NoHash()]) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: an integer is required I understand that there is a real problem here (in my code I had forgotten the "return"); the issue is whether the stack trace should contain some reference to __hash__ or similar. Perhaps that is impossible for containers implemented in C? Thanks, Andrew -- http://mail.python.org/mailman/listinfo/python-list