Metadata-Version: 2.4
Name: mmth
Version: 0.1.0
Summary: A simple multiple-dispatch library for Python
Author-email: Ronan Lamy <ronan.lamy@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/rlamy/mmth
Project-URL: Repository, https://github.com/rlamy/mmth
Project-URL: Documentation, https://mmth.readthedocs.io
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: hypothesis>=6.168.0; extra == "dev"
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: pytest-benchmark>=5.3.0; extra == "dev"
Requires-Dist: ruff>=0.6; extra == "dev"
Requires-Dist: tox>=4; extra == "dev"
Requires-Dist: tox-uv>=1; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs<2,>=1.6; extra == "docs"
Requires-Dist: mkdocs-material>=9; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.26; extra == "docs"
Dynamic: license-file

# mmth

A simple multiple-dispatch library for Python, inspired by Julia's multiple dispatch.

## Installation

```bash
pip install mmth
```

## Quick start

```python
from mmth import dispatch

@dispatch
def add(a: object, b: object) -> object:
    return a + b

@add.register(int, float)
def add_int_float(a: int, b: float) -> float:
    return float(a) + b

print(add(1, 2))     # 3 (int, int) -> default
print(add(1, 2.0))  # 3.0 (int, float) -> registered implementation
```

## Documentation

Full documentation - specification, method dispatch, performance notes, API
reference and development guide - is at https://mmth.readthedocs.io. The
sources live in [`docs/`](docs/).
