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 hashes)