Generic programming library for Python
Generic is a library for Generic programming, also known as Multiple dispatch.
The Generic library supports:
- multi-dispatch: like
functools.singledispatch, but for more than one parameter - multi-methods: multi-dispatch, but for methods
- event dispatching: based on a hierarchical event structure (event objects)
You can read documentation hosted at excellent readthedocs.org project. Development takes place on github.
Changes
1.1.6
- Refactoring
1.1.5
- Fix regression with super type dispatching
- Dependency updates
1.1.4
- Dependency updates
1.1.3
- Dependency updates
1.1.2
- Replace print statements with logging
- Enable trusted publisher for PyPI
- Create Security Policy
- Update LICENSE to BSD 3-Clause
- Add support for Python 3.12
- Simplify build: drop tox
- Update documentation theme to Furo
- Switch linting to ruff
1.1.1
- Add support for Python 3.11
- Move mypy configuration to pyproject.toml
- Enable automatic release of new versions with CI
1.1.0
- Rename
masterbranch tomain generic.event.Managerexecutes all handlers and throws anExceptionGroupin case of errors
1.0.1
- Add Support for Python 3.10, Drop Support for Python 3.7
- Enable Pre-commit Hooks for isort, toml, yaml, pyupgrade, docformatter, and flake8
- Migrate to GitHub Actions
1.0.0
- Updated documentation on Readthedocs
- Fix
multimethod.otherwiseclause
1.0.0b1
- Ported the code to Python 3.7, Python 2 is no longer supported
- Multimethods now have their own module
- The interface now mimics
functools.singledispatch:- the
whenmethod has been renamed toregister - overriding of methods is no longer possible
- the
0.3.1
- Minor fixes in distribution.
0.3
- Event management with event inheritance support.
0.2
- Methods with multidispatch by object type and positional arguments.
- Override multifunctions with
overridemethod.
0.1
- Registry with simple and type axes.
- Functions with multidispatch by positional arguments.
Metadata
Release files for generic 1.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| generic-1.1.7.tar.gz | 8.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| generic-1.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.0 kB
Release files / generic-1.1.7.tar.gz
| Download URL | generic-1.1.7.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d14dae6628542eb084434588d350756c88f2f30c7e2348ad5fcfa01fbdb7ceed
|
|
BLAKE2b-256 checksum How to use checksums |
52a6b1d3ed364b780137f1fc5e85737f42d2d8c6fda5b254c03cb916b7b7715e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 9, 2026.
Transparency logRelease files / generic-1.1.7-py3-none-any.whl
| Download URL | generic-1.1.7-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9048a52debd50e6d7671bb44826567a9c81d2e8302253179adfb8054ab415077
|
|
BLAKE2b-256 checksum How to use checksums |
686d459ded13938c2f2dadf71e107f78001d30b8466fda3acac27a55934b246e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 9, 2026.
Transparency log