skip to navigation
skip to content

compose-func 1.0.1

No frills function composition

Important If you prefer to write Python code in a more functional style you may find the toolz package to be more useful, it includes a compose function as well as several functions conducive to writing functional code in Python.

No magic operators or special objects just a function with unit tests. Here is a wonderfully contrived example to whet your appetite:

>>> import json
>>> from compose import compose
>>> from operator import itemgetter
>>> compose((3).__mul__, next, iter, itemgetter('b'), json.loads)('{"a": 1, "b": [2, 3]}')
6

Contribute

See http://github.com/jonathanj/compose for development.

Installation

$ pip install compose-func
 
File Type Py Version Uploaded on Size
compose-func-1.0.1.tar.gz (md5, pgp) Source 2016-02-04 1KB
compose_func-1.0.1-py2-none-any.whl (md5, pgp) Python Wheel py2 2016-02-04 2KB