Package frozenmap provide frozendict (C based) and frozenmap (Cython based)
Homepage Repository PyPI Python
frozenmap is MIT Licensed python library.
It implements frozendict
type (in C) and FrozenDict
, FrozenMap
classes (in Cython).
This library actually is an attempt to proof the concept of fast frozendict (C/Cython based).
Main repository for frozenmap
is on bitbucket.
First load inventory:
>>> from frozenmap import frozendict, FrozenDict
Simple example:
>>> fd = frozendict(a=1,b=2,c=3) >>> fd frozendict({'a': 1, 'b': 2, 'c': 3}) >>> fd['a'] 1 >>> fd['a'] = 10 ........ TypeError: 'frozenmap._frozendict.frozendict' object does not support item assignment >>> del fd['a'] ......... TypeError: 'frozenmap._frozendict.frozendict' object does not support item deletion >>> fd.pop('a') ......... AttributeError: 'frozenmap._frozendict.frozendict' object has no attribute 'pop' >>> fd = FrozenDict(a=1,b=2,c=3) >>> print(fp) FrozenDict({'a': 1, 'b': 2, 'c': 3}) >>> fd['a'] 1 >>> fd['a'] = 10 ........ TypeError: 'frozenmap.frozendict.FrozenDict' object does not support item assignment >>> del fd['a'] ......... TypeError: 'frozenmap.frozendict.FrozenDict' object does not support item deletion >>> fd.pop('a') ......... AttributeError: 'frozenmap.frozendict.FrozenDict' object has no attribute 'pop'
** 0.6 **
0.5 Initial version