[Python-3000] callable()

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Jul 26 08:20:37 CEST 2006


Andrew Koenig wrote:
> I think of a
> function f as being idempotent if f(x) == x for all x in dom(f).

Um, that's an identity function, isn't it? I think
you mean something more like f(f(x)) == f(x).

But even that's not quite what we're talking about
here, because we're not hashing the result of the
hash function. If idempotency is involved it's
about side effects rather than the return value.
 From a functional point of view, the hash value
of a given object should simply be constant.

--
Greg


More information about the Python-3000 mailing list