Welcome to pyoload v 2.0.2 documentation!

Release status PyPI package Supported Python versions Build Status Coverage Status Documentation Status Pypi downloads Hit count

Hy pythonista, here is pyoload, what is?

A python module to integrate function arguments typechecking, and multiple dispatching in python.

It uses the beauty and ease of use of decorators and python scopes to provide an easy to use tool. here some quick examples.

  source

  python
  from pyoload import *

  @annotate
  def greater_than(a: int | float, b: int | float) -> bool:
      return a > b

  @multimethod
  def foo(a, b=3, c: int = 5):
      ...

  @multimethod
  def foo(a: int, b: Cast(str)):
      ...

  @multimethod
  def foo(a) -> Cast(str):
      return repr(a)

foo(4)

You could look at the title lower for more documentation.