[Python-Dev] Add a frozendict builtin type

Yury Selivanov yselivanov.ml at gmail.com
Fri Mar 2 03:44:25 CET 2012


On 2012-03-01, at 9:31 PM, Guido van Rossum wrote:
> That sounds *very* far-fetched. You're pretty much designing a new
> language variant. It's not an argument for burdening the original

Yeah, that's what we do ;)

> You should be able to prototype what you want using an advisory
> subclass (if you subclass dict and add __slots__=[] to it, it will
> cost very little overhead) or using a custom extension that implements
> the flavor of frozendict that works best for you -- given that you're
> already using greenlets, another extension can't be a bid burden.

I understand.  The only reason I wrote about it is to give an idea of
how frozendicts may be used besides just sandboxing.  I'm not strongly
advocating for it, though.

-
Yury



More information about the Python-Dev mailing list