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

Eli Bendersky eliben at gmail.com
Wed Feb 29 20:33:43 CET 2012


The frozenset type covers a niche case that is nice-to-have but rarely used. Many experienced Python users simply forget that we have a frozenset type. We don't get bug reports or feature requests about the type. When I do Python consulting work, I never see it in a client's codebase. It does occasionally get discussed in questions on StackOverflow but rarely gets offered as an answer (typically on variants of the "how do you make a set-of-sets" question). If Google's codesearch were still alive, we could add another datapoint showing how infrequently this type is used.

There are some alternatives to code.google.com, though. For example:

http://www.koders.com/default.aspx?s=frozenset&submit=Search&la=Python&li=*

From a cursory look: quite a bit of the found results are from the various Python implementations, and there is some duplication of projects, but it would be unfair to conclude that frozenset is not being used since many of the results do look legitimate. This is not to argue in favor or against frozendict, just stating that there's still a way to search code online :)

Eli -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120229/508d0409/attachment.html>



More information about the Python-Dev mailing list