PyCLOS implements CLOS-style generic functions for Python 3. Current implementation is pure python with optional dependency on C implemented lru-dict which gets used for dispatch caches in case of specialization on value.
Example usage:
from py_clos import generic
@generic
def display(what, where):
return "{} on {}".format(what, where)
@generic.around
def display(what, where: Webpage, next_method):
return "<html>{}</html>".format(next_method(what, where))
@generic
def display(what: User, where):
return "user"
Release files for PyCLOS 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| PyCLOS-0.2.tar.gz | 5.4 kB | Details |
Release files / PyCLOS-0.2.tar.gz
| Download URL | PyCLOS-0.2.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b975979a3f463649a162c4de657d513b7e2cebf11090ae2506d86563e58f705
|
|
BLAKE2b-256 checksum How to use checksums |
25a2f8c93367616cb328a8642ac14fbda2cd9ae555490273164d94aba06c47c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |