iterpop
iterpop makes popping the value out of a singleton container or a homogeneous container safe & fun
Free software: MIT license
Documentation: https://iterpop.readthedocs.io.
from iterpop import iterpop as ip
# returns 'a'
ip.popsingleton(['a'])
ip.popsingleton({'a'})
ip.popsingleton('a')
# throws
ip.popsingleton([])
ip.popsingleton(set())
ip.popsingleton('')
# throws
ip.popsingleton(['a', 'b'])
ip.popsingleton({'a', 'b'})
ip.popsingleton('ab'})
# returns 'a'
ip.pophomogeneous(['a'])
ip.pophomogeneous({'a'})
ip.pophomogeneous('a')
# also returns 'a'
ip.pophomogeneous(['a', 'a'])
ip.pophomogeneous('aaa')
ip.pophomogeneous('a' for __ in range(100))
# throws
ip.pophomogeneous([])
ip.pophomogeneous(set())
ip.pophomogeneous('')
# throws
ip.pophomogeneous(['a', 'b'])
ip.pophomogeneous({'a', 'b'})
ip.pophomogeneous('ab'})
# returns 'a'
ip.poursingleton(['a'])
ip.poursingleton({'a'})
ip.poursingleton('a')
# returns None
ip.poursingleton([])
ip.poursingleton(set())
ip.poursingleton('')
# throws
ip.poursingleton(['a', 'b'])
ip.poursingleton({'a', 'b'})
ip.poursingleton('ab'})
# returns 'a'
ip.pourhomogeneous(['a'])
ip.pourhomogeneous({'a'})
ip.pourhomogeneous('a')
# also returns 'a'
ip.pourhomogeneous(['a', 'a'])
ip.pourhomogeneous('aaa')
ip.pourhomogeneous('a' for __ in range(100))
# returns None
ip.pourhomogeneous([])
ip.pourhomogeneous(set())
ip.pourhomogeneous('')
# throws
ip.pourhomogeneous(['a', 'b'])
ip.pourhomogeneous({'a', 'b'})
ip.pourhomogeneous('ab'})
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2020-07-06)
First release on PyPI.
Metadata
Release files for iterpop 0.4.1
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 |
|---|---|---|---|---|
| iterpop-0.4.1.tar.gz | 11.2 kB | Without provenance | Details for iterpop-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iterpop-0.4.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for iterpop-0.4.1-py2.py3-none-any.whl |
Total release size: 15.3 kB
Release files / iterpop-0.4.1.tar.gz
| Download URL | iterpop-0.4.1.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36d1a20a15b4c7afcd3db0a265dce0f5a6e0bbefb712f955667abbddd68fa471
|
|
BLAKE2b-256 checksum How to use checksums |
5772e4ebfe83d3cd70895e9c3eddd34dad7d01b7484de442d23d5cd66bd4935d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.13
|
Release files / iterpop-0.4.1-py2.py3-none-any.whl
| Download URL | iterpop-0.4.1-py2.py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8290df022defb9dda2e3e29a9ae99ecc75ed21908966d3421e9300657c698feb
|
|
BLAKE2b-256 checksum How to use checksums |
eca2b7e4fee1bb1749b8c7e27d520dd747fc16c920d0aadf6323324d88cb7a72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.13
|
Security for iterpop 0.4.1
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.