Skip to main content

functional extensions

Project description

ject

functional extensions

Features

  • length: get length of function parameters
  • oneself: returns the parameter itself
  • pipe: pipe chain of functions

Usage

get length of function parameters

from ject import length

def fun(a, b, *args, **kwargs): return a, b, args, kwargs

print(length(fun)) # 4

pipe chain of functions

from ject import pipe

def add_one(n): return n + 1
def times_two(n): return n * 2

add_one_then_times_two = pipe(add_one, times_two)
print(add_one_then_times_two(4))  # 10

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

ject-0.0.3.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

ject-0.0.3-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file ject-0.0.3.tar.gz.

File metadata

  • Download URL: ject-0.0.3.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.2 Linux/5.7.1-050701-generic

File hashes

Hashes for ject-0.0.3.tar.gz
Algorithm Hash digest
SHA256 7c72dc613b5c601ee6b0f9d33464753053e92bc7c01833320fab4c53ca5bdd1c
MD5 d29ef73a3a5fbe8c8fa20d4f0e98ab20
BLAKE2b-256 8288da717af0d4cfc9f4c71bf1a732442c5f847acbb88c5c9c5f52eef3a329eb

See more details on using hashes here.

File details

Details for the file ject-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: ject-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.2 Linux/5.7.1-050701-generic

File hashes

Hashes for ject-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 84546456bc0d8e2f4d44333082f6b3ca2e9bcc0e6499e0a5f5db25ac701dde42
MD5 61ea5d7b6f15f18b33d0a26a98a6ed7f
BLAKE2b-256 bf7846d62e4ecfbf3cec26f57619c5544c89f69333eeab0a66f63744132e540e

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