Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

Auto allocation dict and list

Project description


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]


  • 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

This version
History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
autodata-0.11.tar.gz (2.3 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page