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.2.tar.gz
(16.9 kB
view hashes)
Built Distribution
Close
Hashes for sliceable_dict-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00d2670a84d65811aefe06c81710aa2cd8e5856db552f2bddb1792561c4ed55a |
|
MD5 | 3d0418f821d147037bbb8a105daf8e56 |
|
BLAKE2b-256 | 051222bad18b240475f682fd264cfccd2507f2c6d498d554c77675b308178d43 |