Skip to main content

singledispatch-with-type-arg-support

Standalone "preview" of https://github.com/python/cpython/pull/100624

Based off cpython commit c4c5790120beabed83ce5855f18d209ab8324434

Installation

Requires a sufficiently recent Python 3.12 version (some tests fail with earlier 3.12 versions, although the main functionality might still work - do your own testing).

pip3 install singledispatch-with-type-arg-support

Example

See example.py:

from singledispatch_with_type_arg_support import singledispatch

@singledispatch
def describe(x) -> str:
  raise TypeError(f"no description for {repr(x)}")

@describe.register
def _(x: type[int]) -> str:
  return "the integer type"

print(describe(int))  # should print: the integer type

License

Same as CPython (as 99% of it is copied from there), see LICENSE file.

Metadata

Release files for singledispatch-with-type-arg-support 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for singledispatch-with-type-arg-support 0.1.3
File Size Uploaded Provenance Actions
singledispatch_with_type_arg_support-0.1.3.tar.gz 10.2 kB Without provenance Details for singledispatch_with_type_arg_support-0.1.3.tar.gz

Release files / singledispatch_with_type_arg_support-0.1.3.tar.gz

Download URL singledispatch_with_type_arg_support-0.1.3.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
906b7454cb907453d1668c283a1bfeaa2d6120feb0a353222a53f4d52d705627
BLAKE2b-256 checksum
How to use checksums
d895692075c684cebee03832bd171745e71e159c7177799f840cb4850ea14f17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0a3

Security for singledispatch-with-type-arg-support 0.1.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page