Skip to main content

zip and zip_longest for dict

Project description

dict_zip

zip and zip_longest for dict.

codecov License PyPI version shields.io

Installation

$ pip install dict-zip

Usage

dict_zip

dict_zip is zip for dict.

>>> from dict_zip import dict_zip
>>> dict_zip({'a': 1, 'b': 2}, {'a': 3, 'b': 4})
{'b': (2, 4), 'a': (1, 3)}

dict_zip_longest

dict_zip_longest is zip_longest for dict. It fills with fillvalue (default: None) when argument dict doesn't have match key.

>>> from dict_zip import dict_zip_longest
>>> dict_zip_longest({'a': 1, 'b': 2, 'c': 4}, {'a': 3, 'b': 4})
{'b': (2, 4), 'a': (1, 3), 'c': (4, None)}

LICENSE

The 3-Clause BSD License. See also LICENSE file.

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

dict_zip-0.2.0.zip (5.6 kB view details)

Uploaded Source

File details

Details for the file dict_zip-0.2.0.zip.

File metadata

  • Download URL: dict_zip-0.2.0.zip
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for dict_zip-0.2.0.zip
Algorithm Hash digest
SHA256 bc032ecddc62b43e1c25c044ab017f5343eeca50fa44994a79e44fafcb1f4f27
MD5 34160f8d522b1494ce5c0ebdc825aedd
BLAKE2b-256 ac48babcc8d42454555709d36006fbd6176f7cf549bcc2bbcbcd4b83b3b44733

See more details on using hashes here.

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