Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A function to breed keys of the dict-like object

Project description

# pip install multdict
# >>> from multdict import multdict

>>> idict = {'a': ['x'], 'b': 0}

>>> assert multdict(idict, 0) == {}

>>> assert multdict(idict, 1) is idict

>>> odict = multdict(idict, 2)
>>> assert idict == {'a': ['x'], 'b': 0}
>>> assert odict == {'a0': ['x'], 'b0': 0, 'a1': ['x'], 'b1': 0}
>>> assert odict['a0'] is odict['a1']

Project details


Download files

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

Files for multdict, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size multdict-0.0.5.tar.gz (933 Bytes) File type Source Python version None Upload date Hashes View hashes

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