Package frozentype provide some frozen python types (frozendict (C based) and frozenmap (Cython based))
Project description
=========
frozentype
=========
**frozentype** is `MIT Licensed <http://opensource.org/licenses/MIT>`_ python library.
It implements some frozen python types: ``frozendict`` type (in C) and ``FrozenDict``, ``FrozenMap`` classes (in Cython).
* `frozendict` is read-only and hashable dictionary (C based).
* `FrozenMap` is read-only mapping object wrapped around a mutable mapping object (Cython based).
* `FrozenDict` is read-only and hashable dictionary (Cython based).
This library actually is an attempt to proof the concept of fast frozendict (C/Cython based).
Main repository for ``frozentype``
is on `bitbucket <https://bitbucket.org/intellimath/frozentype>`_.
Quick start:
------------
First load inventory::
>>> from frozentype 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: 'frozentype._frozendict.frozendict' object does not support item assignment
>>> del fd['a']
.........
TypeError: 'frozentype._frozendict.frozendict' object does not support item deletion
>>> fd.pop('a')
.........
AttributeError: 'frozentype._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: 'frozentype.frozendict.FrozenDict' object does not support item assignment
>>> del fd['a']
.........
TypeError: 'frozentype.frozendict.FrozenDict' object does not support item deletion
>>> fd.pop('a')
.........
AttributeError: 'frozentype.frozendict.FrozenDict' object has no attribute 'pop'
Changes:
--------
** 0.6 ** (migrate from project intellimath/frozenmap)
* Add C implementation for `frozendict`.
* Add tests for frozendict type.
**0.5** Initial version
frozentype
=========
**frozentype** is `MIT Licensed <http://opensource.org/licenses/MIT>`_ python library.
It implements some frozen python types: ``frozendict`` type (in C) and ``FrozenDict``, ``FrozenMap`` classes (in Cython).
* `frozendict` is read-only and hashable dictionary (C based).
* `FrozenMap` is read-only mapping object wrapped around a mutable mapping object (Cython based).
* `FrozenDict` is read-only and hashable dictionary (Cython based).
This library actually is an attempt to proof the concept of fast frozendict (C/Cython based).
Main repository for ``frozentype``
is on `bitbucket <https://bitbucket.org/intellimath/frozentype>`_.
Quick start:
------------
First load inventory::
>>> from frozentype 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: 'frozentype._frozendict.frozendict' object does not support item assignment
>>> del fd['a']
.........
TypeError: 'frozentype._frozendict.frozendict' object does not support item deletion
>>> fd.pop('a')
.........
AttributeError: 'frozentype._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: 'frozentype.frozendict.FrozenDict' object does not support item assignment
>>> del fd['a']
.........
TypeError: 'frozentype.frozendict.FrozenDict' object does not support item deletion
>>> fd.pop('a')
.........
AttributeError: 'frozentype.frozendict.FrozenDict' object has no attribute 'pop'
Changes:
--------
** 0.6 ** (migrate from project intellimath/frozenmap)
* Add C implementation for `frozendict`.
* Add tests for frozendict type.
**0.5** Initial version
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for frozentype-0.6-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 209fb57f0ecf57dd55be7d689952a79406bbba729f127cf885c2813f652e33ac |
|
MD5 | ca4445983dc3ed0eae5412575d901518 |
|
BLAKE2b-256 | 2c149f17514293182df4567d40d01574294cde7f8a0bdf5287853f4aaba36c75 |
Close
Hashes for frozentype-0.6-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1eb7162c5441c10b85ce176f47345526cfbdeea155cb1f8090fdbef3347fd59b |
|
MD5 | 2e18280f0ca5efa049cd6a2f975cafb8 |
|
BLAKE2b-256 | 25e2de7e7fbe67c706a7f78b34ee1f22596515af3194660ec256ff20546e22b7 |
Close
Hashes for frozentype-0.6-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c418381b6ef3fbd4fb8244be91e81936b78162d6249c1cbf1f03ae05a9a40650 |
|
MD5 | dba75153a124046b17b29a6f1b45ab5b |
|
BLAKE2b-256 | 569da7187d82e259d26b6b41c64c7233538eb71260a689e24b752d95ebe9bd05 |
Close
Hashes for frozentype-0.6-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4500515de826a1358794a8f3e8cb8f7d6e0841b461c470abe7353ab8e6226f83 |
|
MD5 | 6e327b477841939d78181e8691375169 |
|
BLAKE2b-256 | 834b0b3d9f7872c6a23bf92e1f69b8aaf15b4a0bb73260ca040c7bf3dc744438 |
Close
Hashes for frozentype-0.6-cp27-cp27m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f93e606ee738014b770b82527bd251f6c367ed3f36c05bc9e796c81a21a654f |
|
MD5 | b91d0ccb41d0923a35f0afe5b4e2ca9e |
|
BLAKE2b-256 | e7ade15e31ac1e79f29ac93a7d21d46684415c85dd1db29a89ae009ebd7986e6 |