[Python-Dev] PEP 351, the freeze protocol
jcarlson at uci.edu
Mon Oct 24 04:50:47 CEST 2005
Barry Warsaw <barry at python.org> wrote:
> I've had this PEP laying around for quite a few months. It was inspired
> by some code we'd written which wanted to be able to get immutable
> versions of arbitrary objects. I've finally finished the PEP, uploaded
> a sample patch (albeit a bit incomplete), and I'm posting it here to see
> if there is any interest.
Shouldn't that be:
return tuple(map(freeze, self))
"Should dicts and sets automatically freeze their mutable keys?"
Dictionaries don't have mutable keys, but it is of my opinion that a
container which is frozen should have its contents frozen as well.
More information about the Python-Dev