Generic programming library for Python
Project description
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.0
- Rename
master
branch tomain
generic.event.Manager
executes all handlers and throws anExceptionGroup
in 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.otherwise
clause
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
when
method 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
override
method.
0.1
- Registry with simple and type axes.
- Functions with multidispatch by positional arguments.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
generic-1.1.0.tar.gz
(9.8 kB
view details)
Built Distribution
File details
Details for the file generic-1.1.0.tar.gz
.
File metadata
- Download URL: generic-1.1.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.17.4-200.fc35.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffde3ba04bd9483e668d10fda9cbb328015ab62bd399a79e8d7c50df6d940fe0 |
|
MD5 | 90ca983593561a597773b43c0f49c9a3 |
|
BLAKE2b-256 | 2402bbf8b0cf28eb14dd268fd80414e25ebec04dec1148b040be212bac172772 |
File details
Details for the file generic-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: generic-1.1.0-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.17.4-200.fc35.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bf903541a808a958fd282809ae4e4687e0b7e99f9d31edd203ad10b386875e7 |
|
MD5 | cf7906f39f92b7e16f60120ce6095a93 |
|
BLAKE2b-256 | 739271703f29d8c2035a462b6fdc290203b7ef50bfd76de59f6ab1de984b6235 |