[Python-Dev] Add a frozendict builtin type

Giampaolo Rodolà g.rodola at gmail.com
Thu Mar 1 10:28:46 CET 2012


Il 01 marzo 2012 02:45, Raymond Hettinger
<raymond.hettinger at gmail.com> ha scritto:
>
> On Feb 29, 2012, at 4:23 PM, Victor Stinner wrote:
>
> One of my colleagues implemented recently its own frozendict class
> (which the "frozendict" name ;-)
>
>
> I write new collection classes all the time.
> That doesn't mean they warrant inclusion in the library or builtins.
> There is a use case for ListenableSets and ListenableDicts -- do we
> need them in the library?  I think not.  How about case insensitive
> variants?
> I think not.  There are tons of recipes on ASPN and on PyPI.
> That doesn't make them worth adding in to the core group of types.
>
> As core developers, we need to place some value on language
> compactness and learnability.  The language has already gotten
> unnecessarily fat -- it is the rare Python programmer who knows
> set operations on dict views, new-style formatting, abstract base classes,
> contextlib/functools/itertools, how the with-statement works,
> how super() works, what properties/staticmethods/classmethods are for,
> differences between new and old-style classes, Exception versus
> BaseException,
> weakreferences, __slots__, chained exceptions, etc.
>
> If we were to add another collections type, it would need to be something
> that powerfully adds to the expressivity of the language.  Minor variants
> on what we already have just makes that language harder to learn and
> remember
> but not providing much of a payoff in return.
>
>
> Raymond
>
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/g.rodola%40gmail.com
>

+1

--- Giampaolo
http://code.google.com/p/pyftpdlib/
http://code.google.com/p/psutil/
http://code.google.com/p/pysendfile/


More information about the Python-Dev mailing list