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

Raymond Hettinger raymond.hettinger at gmail.com
Thu Mar 1 00:25:43 CET 2012


On Feb 29, 2012, at 1:08 PM, Paul Moore wrote:

As it stands, I don't find the PEP compelling. The hardening use case might be significant but Victor needs to spell it out if it's to make a difference.

If his sandboxing project needs it, the type need not be public. It can join dictproxy and structseq in our toolkit of internal types.

Adding frozendict() as a new public type is unnecessary and undesirable -- a proliferation of types makes it harder to decide which tool is the most appropriate for a given problem. The itertools module ran into the issue early. Adding a new itertool tends to make the whole module harder to figure-out.

Raymond

P.S ISTM that lately Python is growing fatter without growing more powerful or expressive. Generators, context managers, and decorators were honking good ideas -- we need more of those rather than minor variations on things we already have.

Plz forgive the typos -- I'm typing with one hand -- the other is holding a squiggling baby :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120229/8611f20a/attachment.html>



More information about the Python-Dev mailing list