Skip to main content

functional extensions

Project description


functional extensions


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


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.

Files for ject, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size ject-0.0.3-py3-none-any.whl (2.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ject-0.0.3.tar.gz (2.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page