Metadata-Version: 2.1
Name: funcclasses
Version: 0.0.2
Project-URL: Documentation, https://github.com/joshua-auchincloss/funcclasses#readme
Project-URL: Issues, https://github.com/joshua-auchincloss/funcclasses/issues
Project-URL: Source, https://github.com/joshua-auchincloss/funcclasses
Author-email: joshua-auchincloss <joshua.auchincloss@proton.me>
License-Expression: MIT
License-File: LICENSE.txt
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# funcclasses

[![PyPI - Version](https://img.shields.io/pypi/v/funcclasses.svg)](https://pypi.org/project/funcclasses)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/funcclasses.svg)](https://pypi.org/project/funcclasses)

---

**Table of Contents**

- [Installation](#installation)
- [License](#license)

## Installation

```console
pip install funcclasses
```

## Usage

### `partial`

```py
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](https://spdx.org/licenses/MIT.html) license.
