pguard
Guard like Haskell for Python.
Status
Requirements
Python 2.7 or Python 3.6 over or PyPy 2.4.0 over
Features
guard with lambda
Enable to use function or method as guard_cl statement argument.
Setup
$ pip install --user pguard or (venv)$ pip install pguard
Simple usage
>>> from pguard import guard >>> from pguard import guard_cl as g >>> (lambda n: guard( ... g(-1, n < 0), ... g(0, n == 0), ... g(1) ## otherwise ... ))(0) 0
ChangeLog
0.4.0 (2019-03-18)
Supports Python 3.7.
Drops Python 2.7, Python 3.5.
0.3.1 (2018-11-03)
Fixes pylint violations.
0.3.0 (2016-04-30)
Fixes lazy evaluation.
Changes guard_cl() respond values.
0.2.1 (2016-04-29)
Fixes Python 2.7 classmethod behavior bugs.
0.2.0 (2016-04-27)
Supports “function” and “method” as guard_cl statement argument.
0.1.4 (2016-04-24)
Fixes setup.py url.
0.1.3 (2016-04-23)
Fixes README.
Adds check long-description to pre-commit hook.
0.1.2 (2016-04-23)
Fixes setup.py version.
0.1.1 (2016-04-23)
completed coverage 100%.
Adds sample usages.
0.1.0 (2016-04-23)
Initial release.
Metadata
Release files for pguard 0.4.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 |
|---|---|---|---|---|
| pguard-0.4.0.tar.gz | 10.3 kB | Without provenance | Details for pguard-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pguard-0.4.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for pguard-0.4.0-py2.py3-none-any.whl |
Total release size: 13.7 kB
Release files / pguard-0.4.0.tar.gz
| Download URL | pguard-0.4.0.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0268b0de9a8c195f441446c4562686a4e9d3412aa0295c79c5d70a0ccc36ee33
|
|
BLAKE2b-256 checksum How to use checksums |
de91feb33f4b5bca014bcdd5ef97af482f9516b302a245b9993f7e68ee28d650
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3rc1
|
Release files / pguard-0.4.0-py2.py3-none-any.whl
| Download URL | pguard-0.4.0-py2.py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e962c6954e5f0fcce02448581fef4565c63021140cda7c5176c90e00e39e1cdd
|
|
BLAKE2b-256 checksum How to use checksums |
1cddc1d145848a156e9397c70ac8e294e905e92f14a45df80e587feb38f2f171
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3rc1
|
Security for pguard 0.4.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.