[Python-Dev] PEP 416: Add a frozendict builtin type (original) (raw)

Eli Bendersky eliben at gmail.com
Wed Feb 29 20:10:55 CET 2012


> Rationale > ========= > > A frozendict mapping cannot be changed, but its values can be mutable > (not hashable). A frozendict is hashable and so immutable if all > values are hashable (immutable). The wording of the above seems very unclear to me.

Do you mean "A frozendict has a constant set of keys, and for every key, d[key] has a specific value for the lifetime of the frozendict. However, these values may be mutable. The frozendict is hashable iff all of the values are hashable." ? (or somesuch) [...snip...]

I agree that this sentence needs some clarification. David's formulation is also what I would guess it to mean, but it should be stated more explicitly.

Eli -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120229/8d7703cf/attachment.html>



More information about the Python-Dev mailing list