A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-October/057552.html below:

[Python-Dev] PEP 351, the freeze protocol

[Python-Dev] PEP 351, the freeze protocol [Python-Dev] PEP 351, the freeze protocolJosiah Carlson 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.
> 
> http://www.python.org/peps/pep-0351.html



    class xlist(list):
        def __freeze__(self):
            return tuple(self)

Shouldn't that be:

    class xlist(list):
        def __freeze__(self):
            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.

 - Josiah

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4