[Python-Dev] Add a frozendict builtin type

Paul Moore p.f.moore at gmail.com
Tue Feb 28 13:13:52 CET 2012


On 28 February 2012 12:07, Mark Shannon <mark at hotpy.org> wrote:
>>> frozendict helps also in threading and multiprocessing.
>>
>> How so?
>
> Inter process/task communication requires copying. Inter/intra thread
> communication uses reference semantics. To ensure these are the same,
> the objects used in communication must be immutable.

Does that imply that in a frozendict, the *values* as well as the
*keys* must be immutable?

Isn't that a pretty strong limitation (and hence, does it not make
frozendicts a lot less useful than they might otherwise be)?


More information about the Python-Dev mailing list