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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file Autocurry-0.2.0.tar.gz.

File metadata

  • Download URL: Autocurry-0.2.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6

File hashes

Hashes for Autocurry-0.2.0.tar.gz
Algorithm Hash digest
SHA256 17055d05c960e5df9e541058cc6e7ded4343340ed391d920610d57fbd6d4a673
MD5 3c29daff91d2da69f18ee58f4f3cfeaf
BLAKE2b-256 08ffad06e7abf31f602454484896cd560178ba4ddd5298c575fde8ce55230b9d

See more details on using hashes here.

File details

Details for the file Autocurry-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: Autocurry-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6

File hashes

Hashes for Autocurry-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54c0fdf0a0c3dc539679f37ca8a12271782a35e8b23162a8356d3140c40b4584
MD5 122d32160fb94b65dd332a993e5de845
BLAKE2b-256 85e0c53ad786d8900194952433bcf07ac3cacfa3be07b068a8dcb151f7f21f33

See more details on using hashes here.

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