Skip to main content

dynamic dispatch decorator for classes and functions

Project description

Dynamic Dispatch

Build status PyPI PyPI - License

A lightweight, dynamic dispatch implementation for classes and functions. This allows a class or function to delegate its implementation conditioned on the value of its first argument. This is similar to functools.singledispatch, however this library dispatches over value while the other dispatches over type.

Install

You may install this via the dynamic-dispatch package on PyPi:

pip3 install dynamic-dispatch

Usage

Development

When developing, it is recommended to use Pipenv. To create your development environment:

pipenv install --dev

Testing

This library uses the unittest framework. Tests may be run with the following:

python3 -m unittest

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

dynamic_dispatch-1.0.3.tar.gz (5.8 kB view hashes)

Uploaded Source

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