Skip to main content

zip and zip_longest for dict

Project description

dict_zip

zip and zip_longest for dict.

Python PyPI version codecov License dict-zip

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})
{'a': (1, 3), 'b': (2, 4)}

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})
{'a': (1, 3), 'b': (2, 4), 'c': (4, None)}

Type hints

dict_zip supports for type hints.

screen-shot-of-type-hints

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.5.0.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

dict_zip-0.5.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file dict_zip-0.5.0.tar.gz.

File metadata

  • Download URL: dict_zip-0.5.0.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dict_zip-0.5.0.tar.gz
Algorithm Hash digest
SHA256 47d9fc84e207692642d1e344da811fc6f991bb7eb1cc8ebcdb07ad290c58a7d1
MD5 b5d1fa17ccd7a7cdbfa9066c7322e7a4
BLAKE2b-256 aa025b1355641c1f54770374f74e777f3e58a2b93527b66c6c8b1c1ebec5f52d

See more details on using hashes here.

File details

Details for the file dict_zip-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: dict_zip-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dict_zip-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 790c95d2fb4e53c8471e93bf8e6d99ca33b8191bfee0d7da8277c4c217bdf744
MD5 9f399404d69211cae9aefee7fd6e6cf8
BLAKE2b-256 8903bf357b1d97fdca4dbb18c7804be4a8b789e40d5d64b4fa509bda832cccbd

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