Auto allocation dict and list
Project description
Overview
This is auto allocate dict and list like Perl.
import autodata
d = autodata.autodict()
d["key1"]["key2"] = "val" # => d["key1"] == {"key2": "val"}
d["key2"] += 1 # => d["key2"] == 1
d["key3"][2] = 1 # => d["key3"] == [None, None, 1]
Restriction
The type of dict key is only strings.
Dict item is not allocated by dict.get method.
None value is not returned by autolist[number]. Instead, an emptyitem object is returned.
Known issues
d = autodata.autodict()
a = d["key"]
a += 1 # => d == {"key" : 1}
a += 1 # => d == {"key" : 1}
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
autodata-0.12.tar.gz
(2.9 kB
view details)
Built Distribution
File details
Details for the file autodata-0.12.tar.gz
.
File metadata
- Download URL: autodata-0.12.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
21f8ac16c4464d962801bbd84bd333402a9ad954adf5d2a021e97f453beb63b7
|
|
MD5 |
fc70f9c80e1f21d044732be218e0d079
|
|
BLAKE2b-256 |
41e3116751a0266a8bf28fae88b6283a1af48be84227c56a4bcd3d8afe34c2a0
|
File details
Details for the file autodata-0.12-py3-none-any.whl
.
File metadata
- Download URL: autodata-0.12-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
0c357c6c9fd00ba3aef3c9fdb448d4ffdc66ad9c0b3f89ac3ead7932de919d78
|
|
MD5 |
23b767e89eef01207cd27b472eea51e7
|
|
BLAKE2b-256 |
ef844de040a0458f71ae12770d11cc367302da22adcef4ce6f9c4536b4bcc384
|