Does Python3 offer a FrozenDict?

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Tue Dec 16 12:28:09 EST 2008


Johannes Bauer:
> is there anything like a frozen dict in Python3, so I could do a
> foo = { FrozenDict({"a" : "b"}): 3 }

You can adapt this code to Python3 (and post a new recipe? It may be
positive to create a new section of the Cookbook for Py3 only):
http://code.activestate.com/recipes/414283/

Please remember that Py3 is very new, so 99% of the stuff present for
Py2.x is absent. Using Py3 is your choice.

Bye,
bearophile



More information about the Python-list mailing list