Backports python3.10 typing features into python3.8 and python3.9.
Project description
sigparse
Backports python3.10 typing features into python3.8 and 3.9.
Example
import sigparse
def func(param_a: list[str], param_b: str | int, param_c: tuple[int | None]):
...
# This returns the same result in python 3.8, 3.9, and 3.10!
sigparse.sigparse(func)
Notes
Inspect
This module uses inspect behind the scenes. For that reason:
sigparse.Parameter.default
isinspect._empty
when there is no default value.sigparse.Parameter.kind
isinspect._ParameterKind
.
Annotated
typing.Annotated
will always be evaluated with include_extras=True
in python3.9.
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
sigparse-1.0.1.tar.gz
(3.1 kB
view details)
Built Distribution
File details
Details for the file sigparse-1.0.1.tar.gz
.
File metadata
- Download URL: sigparse-1.0.1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.8.13 Linux/5.15.0-1019-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ec616b96239d92fe58b882c6564cd25b67b6c3ccb3d82eb217159cc1cb0e1b9 |
|
MD5 | bc8654c4c553485054f2ac6b7b7a55a8 |
|
BLAKE2b-256 | f819abf304d50ee442f8a9d17a40585c61199b449a3ac16181bc3a3df128fb2b |
File details
Details for the file sigparse-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: sigparse-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.8.13 Linux/5.15.0-1019-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17d28c4906f7780467d73211dbb645dcb5d2cb1f848ff01c2688a6905132f782 |
|
MD5 | bc20b7e09bc81a5d03779eaeac9602dd |
|
BLAKE2b-256 | e3fc1edc0926fc152964fee424c7af74df3fed4d9745f3e4965c1a31f4ee6a2a |