Skip to main content

mom can we have dict unpacking in python?

we have dict-unpacking-at-home

please don't use this

no seriously. I do not need another joke package of mine to be deemed "critical" to pypi 1

ok how do I use it

  1. pip install dict-unpacking-at-home
  2. add # -*- coding: dict-unpacking-at-home -*- to the top of your file (second line if you have a shebang)
  3. enjoy!
# -*- coding: dict-unpacking-at-home -*-

dct = {'greeting': 'hello', 'thing': 'world'}

{greeting, thing} = dct
print(greeting, greeting, thing)  # hello hello world

# even with nesting!
dct = {'a': [1, 2, 3]}
{'a': [1, *rest]} = dct
print(rest)  # [2, 3]

problems

the current version breaks line numbers in stacktraces -- the correct-line-numbers branch has a fix. but at what cost.

see also please don't use this

  1. with almost a million downloads per month and 30M+ total ↩

Metadata

Release files for dict-unpacking-at-home 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dict-unpacking-at-home 1.0.0
File Size Uploaded Provenance Actions
dict_unpacking_at_home-1.0.0.tar.gz 4.2 kB Without provenance Details for dict_unpacking_at_home-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dict-unpacking-at-home 1.0.0
File Interpreter ABI Platform Actions
dict_unpacking_at_home-1.0.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for dict_unpacking_at_home-1.0.0-py2.py3-none-any.whl

Total release size: 8.7 kB

Release files / dict_unpacking_at_home-1.0.0.tar.gz

Download URL dict_unpacking_at_home-1.0.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ca1afec6b3d916cbd1680bdb8629ae0a445904edaa2633f7f9300d45eb2d3d9c
BLAKE2b-256 checksum
How to use checksums
f88629ec5c860d9b81370599faa6a839d4024a37aa750406e3447281c38819ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / dict_unpacking_at_home-1.0.0-py2.py3-none-any.whl

Download URL dict_unpacking_at_home-1.0.0-py2.py3-none-any.whl
Size 4.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
86de2676a7f9ec6ddb2c9ed75f8b165bcc6464c94f4cc7deed438cf6b626204f
BLAKE2b-256 checksum
How to use checksums
2529ab826f350e67e1ee156689e67f94232ca956a4c7d5105fbfb647ed823d3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Security for dict-unpacking-at-home 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page