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
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
ject-0.0.3.tar.gz
(2.0 kB
view hashes)
Built Distribution
ject-0.0.3-py3-none-any.whl
(2.6 kB
view hashes)