Skip to main content
========
pguard
========

Guard like Haskell for Python.

Status
======

.. image:: https://secure.travis-ci.org/mkouhei/pguard.png?branch=master
:target: http://travis-ci.org/mkouhei/pguard
.. image:: https://coveralls.io/repos/mkouhei/pguard/badge.png?branch=master
:target: https://coveralls.io/r/mkouhei/pguard?branch=master
.. image:: https://img.shields.io/pypi/v/pguard.svg
:target: https://pypi.python.org/pypi/pguard
.. image:: https://readthedocs.org/projects/pguard/badge/?version=latest
:target: https://readthedocs.org/projects/pguard/?badge=latest
:alt: Documentation Status

Requirements
============

* Python 2.7 or Python 3.3 over or PyPy 2.4.0 over

Features
========

* guard with lambda

Setup
=====

::

$ pip install --user pguard
or
(venv)$ pip install pguard

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.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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pguard-0.1.2.tar.gz (9.0 kB view details)

Uploaded Source

File details

Details for the file pguard-0.1.2.tar.gz.

File metadata

  • Download URL: pguard-0.1.2.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pguard-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3b2e45ec3120a880ef7c435c75f646f534ce48a80f365d45d1ccc2aaadee9f70
MD5 ab53a678d88d96294f4cbfa0f61bd00c
BLAKE2b-256 26aaab3063db5b91a8c3bdb8e499179a1c67936db18fd816994833e6762ac317

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page