Typing extensions extensions
Project description
teext – typing extensions extensions
Package which provides useful types.
Documentation
Examples
Value-constraint types without runtime overhead
These types are most useful in conjunction with static type checkers like mypy.
import teext as tx
def f(x: tx.PositiveInt) -> None:
print(x)
a = 5
assert tx.is_positive_int(a)
f(a) # OK
f(7) # works at runtime but mypy gives error
assert tx.is_positive_int(-3) # AssertionError
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
teext-0.1.9.tar.gz
(7.8 kB
view hashes)
Built Distributions
teext-0.1.9-py3-none-any.whl
(86.3 kB
view hashes)
Close
Hashes for teext-0.1.9-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43ea723262adce78bbc52ae766b1c9eeab6b53cc69e7a149131cdd9b61dcaace |
|
MD5 | 02665e5bda0e93037e04717f3db098f6 |
|
BLAKE2b-256 | ec8fd06bf56745374dec7a503d099d1a88935d4b373de499f7225a5c850264fa |