typesafe - formal type asserting decorators
Usage:
from typesafe import *
@types_hard( name=str, age=(int,float))
def func_or_method(name, age):
pass
@types_hard(dict( name=str, age=(int,float) ))
def func_or_method(name, age):
pass
The @types_hard() decorator raises HardTypesException unless
calling arguments are of the specified type or types:
@types_hard(argname=type, [...])
@types_hard(argname=types, [...])
The @types_soft() decorator raises SoftTypesException unless
calling argument types match, or are subtypes, of the specified
type or types.
@types_soft(argname=type, [...])
@types_soft(argname=types, [...])
Usage:
from typesafe import *
@types_hard( name=str, age=(int,float))
def func_or_method(name, age):
pass
@types_hard(dict( name=str, age=(int,float) ))
def func_or_method(name, age):
pass
The @types_hard() decorator raises HardTypesException unless
calling arguments are of the specified type or types:
@types_hard(argname=type, [...])
@types_hard(argname=types, [...])
The @types_soft() decorator raises SoftTypesException unless
calling argument types match, or are subtypes, of the specified
type or types.
@types_soft(argname=type, [...])
@types_soft(argname=types, [...])
Release files for typesafe 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| typesafe-0.9.1.tar.gz | 2.6 kB | Details |
Release files / typesafe-0.9.1.tar.gz
| Download URL | typesafe-0.9.1.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b3619f454f05b1628c1830660d19b7e2fdc5ec9475265f67171bade3e63e91ee
|
|
BLAKE2b-256 checksum How to use checksums |
775183dd5b0163f735c53c598d72bbee8843d1f67c1256f0ac230f68f3db9c26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |