Dictionary that support slicing and multiple key selection
Project description
sliceable-dict
A simple dictionary that support slicing and multiple key selection.
Installation and requirements
Slice-dict requires Python 3.7+ to run and can be installed by running
pip install sliceable-dict
Usage
One can use SliceDict
identical to dict
, but it brings some additional
features, like getting and setting multiple keys at once and slicing.
>>> from sliceable_dict import SliceDict
>>> d = SliceDict(zero=0, one=1)
>>> d
{'zero': 0, 'one': 1,}
>>> d[['two', 'three']] = 2, 3
>>> d[1:-1]
{'one': 1, 'two': 2}
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 Distribution
sliceable_dict-0.0.3.tar.gz
(16.9 kB
view hashes)
Built Distribution
Close
Hashes for sliceable_dict-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d818c2a7e025358758f239d761a667b7ef6c68925c8ac337b044d0f8fa9c92d |
|
MD5 | d5405b0d3a70f6811f960df405d16373 |
|
BLAKE2b-256 | 2a3b817aaecf1163ecaef548ee36235b3a3185f7da415dd42e13a539c1918045 |