funcclasses
Table of Contents
Installation
pip install funcclasses
Usage
partial
from typing import Callable, SupportsInt, SupportsComplex, SupportsFloat
from beartype import beartype
from funcclasses.partial import partial
Numberlike = SupportsFloat | SupportsComplex | SupportsInt
def my_list_mut(
func: Callable[[Numberlike, Numberlike], Numberlike],
a: Numberlike,
b: Numberlike,
):
return func(a,b)
@beartype
def add(a:Numberlike, b:Numberlike) -> Numberlike:
return a + b
sum_generic = partial(my_list_mut, add)
if __name__ == "__main__":
sum_generic(a=21,b=21) # -> 42
License
funcclasses is distributed under the terms of the MIT license.
Metadata
Release files for funcclasses 0.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 | Provenance | Actions |
|---|---|---|---|---|
| funcclasses-0.0.2.tar.gz | 8.0 kB | Without provenance | Details for funcclasses-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| funcclasses-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for funcclasses-0.0.2-py3-none-any.whl |
Total release size: 11.7 kB
Release files / funcclasses-0.0.2.tar.gz
| Download URL | funcclasses-0.0.2.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc74fde95be3cae57a0c043f553ec210865e4bb9df822a2eb99dcc1d92feff81
|
|
BLAKE2b-256 checksum How to use checksums |
dbcebfd8dcc2d86e932e7e16c90ad2e6cb01008e7e87d971c85e03e127dfcd78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / funcclasses-0.0.2-py3-none-any.whl
| Download URL | funcclasses-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
916b25c3f2deb0e9790f092d8ef6835a6b3a8b4a905e717adfc3b8dd2e7a6f29
|
|
BLAKE2b-256 checksum How to use checksums |
aa72d2d806657aee8662ead6e8301dcdb301625070e3745652f8779ab4dbdd19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Security for funcclasses 0.0.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.