Well, something like the following rule could be used to detect tuples that can cache their hash values: All the entries in the a hash-safe tuple must be non-NULL, and of an immutable builtin type (int, long, float, string, unicode, and hash-safe tuple.) Jeff