Automatic currying using a decorator
Project description
Autocurry
Currying is a powerful technique in functional programming languages like Haskell. This decorator allows a function to be automatically curried by supplying fewer arguments than required.
Installation
pip3 install autocurry
Usage
from autocurry import autocurry
@autocurry
def find_by_key_with_connection(db_connection, key):
pass
find_by_key = find_by_key_with_connection(some_connection)
value1 = find_by_key('my_key')
value2 = find_by_key('your_key')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Autocurry-0.2.0.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for Autocurry-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54c0fdf0a0c3dc539679f37ca8a12271782a35e8b23162a8356d3140c40b4584 |
|
MD5 | 122d32160fb94b65dd332a993e5de845 |
|
BLAKE2b-256 | 85e0c53ad786d8900194952433bcf07ac3cacfa3be07b068a8dcb151f7f21f33 |