Skip to main content

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.

Source Distribution

multdict-0.0.5.tar.gz (933 Bytes view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page