PPrint Ordered Sets
The standard library pprint module, but with the feature that
all sets are ordered.
Why does this package exist?
This package is a backport for the bug-fix bpo-27495.
This package ensures that set and frozenset objects are always ordered, which
is not true of the pprint module.
As of writing this, the pull request that fixes this bug has not been merged.
Example
>>> import pprint_ordered_sets as pprint
>>> obj = set("abcdefg")
>>> print(obj) # Will be different on different systems.
{'d', 'f', 'b', 'g', 'e', 'a', 'c'}
>>> pprint.pp(obj) # Will be same on all systems.
{'a', 'b', 'c', 'd', 'e', 'f', 'g'}
License
This code is licensed under the Python Software Foundation license, as this
is a derivative work. My changes are adding the default ordering of set and
frozenset objects, writing additional tests to cover these features, and renaming
of this module to pprint_ordered_sets.
Testing
This package requires no dependencies to test, simply run:
python -m unittest test_pprint_ordered_sets.py
Metadata
Release files for pprint-ordered-sets 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pprint_ordered_sets-1.0.0.tar.gz | 10.2 kB | Without provenance | Details for pprint_ordered_sets-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pprint_ordered_sets-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for pprint_ordered_sets-1.0.0-py3-none-any.whl |
Total release size: 20.5 kB
Release files / pprint_ordered_sets-1.0.0.tar.gz
| Download URL | pprint_ordered_sets-1.0.0.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
742bf4f5912123f970d98bbca17379b1e610d9d025adbaadb3b37e439b50c174
|
|
BLAKE2b-256 checksum How to use checksums |
5eb6cf6253e5c0c016c04c122ee1dae0803e9d75a20e410035ea9a0855c23ef7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.0 Darwin/19.5.0
|
Release files / pprint_ordered_sets-1.0.0-py3-none-any.whl
| Download URL | pprint_ordered_sets-1.0.0-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4b4428fe51020e932ec5d8feed42cf8dd1dbcd85f1c99a9709010314ad9bd4e8
|
|
BLAKE2b-256 checksum How to use checksums |
c634e41b22133ae073883e20d96943690781766592e33c0348865673c36cef36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.0 Darwin/19.5.0
|
Security for pprint-ordered-sets 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.