The documentation states:
cache_hash (bool) – Ensure that the object’s hash code is computed only once and stored on the object. If this is set to True, hashing must be either explicitly or implicitly enabled for this class. If the hash code is cached, then no attributes of this class which participate in hash code computation may be mutated after object creation.
A reader could read this as meaning that only the local fields of this object should not be assigned to and that using this on any frozen class is okay. We should clarify that the object needs to be "deeply immutable" for this to be safe.
The documentation states:
A reader could read this as meaning that only the local fields of this object should not be assigned to and that using this on any
frozenclass is okay. We should clarify that the object needs to be "deeply immutable" for this to be safe.