Skip to main content

Backports python3.10 typing features into python3.8 and python3.9.git

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 is inspect._empty when there is no default value.
  • sigparse.Parameter.kind is inspect._ParameterKind.

Annotated

typing.Annotated will always be evaluated with include_extras=True in python3.9.

Project details


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.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

sigparse-1.0.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file sigparse-1.0.0.tar.gz.

File metadata

  • Download URL: sigparse-1.0.0.tar.gz
  • Upload date:
  • Size: 3.0 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

Hashes for sigparse-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7abb9eece8896ed966a1694a2727a275f194ca4ec4a2622fd6d98bfff981dd4c
MD5 24b8d7fad48497ccdd9a81274aabecb5
BLAKE2b-256 1eef42f3d70e04398fc4a208480d64e71f60dba3f7c86309afec4c7c1c7e8399

See more details on using hashes here.

File details

Details for the file sigparse-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sigparse-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 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

Hashes for sigparse-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ca13ee6014f1031f111eb27190e3685ddc8bf82e55365d327b618b345362495
MD5 c9d055b5d86e7ffb42f8080a3d1e34e2
BLAKE2b-256 56f944ab8959079969f25f0070f2484fa7d096aadde8100b3ee50f118d9268fb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page