Skip to main content

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


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)

Uploaded Source

Built Distribution

Autocurry-0.2.0-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

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