Module implementing the parameter types code.
|
|
|
|
|
TNotNone(val)
Checks if the given value is not None. |
source code
|
|
|
TNone(val)
Checks if the given value is None. |
source code
|
|
|
TBool(val)
Checks if the given value is a boolean. |
source code
|
|
|
TInt(val)
Checks if the given value is an integer. |
source code
|
|
|
TFloat(val)
Checks if the given value is a float. |
source code
|
|
|
TString(val)
Checks if the given value is a string. |
source code
|
|
|
TTrue(val)
Checks if a given value evaluates to a boolean True value. |
source code
|
|
|
TElemOf(target_list)
Builds a function that checks if a given value is a member of a list. |
source code
|
|
|
TList(val)
Checks if the given value is a list. |
source code
|
|
|
TDict(val)
Checks if the given value is a dictionary. |
source code
|
|
|
TIsLength(size)
Check is the given container is of the given size. |
source code
|
|
|
TAnd(*args)
Combine multiple functions using an AND operation. |
source code
|
|
|
TOr(*args)
Combine multiple functions using an AND operation. |
source code
|
|
|
TMap(fn,
test)
Checks that a modified version of the argument passes the given test. |
source code
|
|
|
TListOf(my_type)
Checks if a given value is a list with all elements of the same type. |
source code
|
|
|
TDictOf(key_type,
val_type)
Checks a dict type for the type of its key/values. |
source code
|
|
|
NoDefault = object()
The without-default default value
|
|
NoType = object()
The no-type (value to complex to check it in the type system)
|
|
TNonEmptyString = TAnd(TString, TTrue)
a non-empty string
|
|
TMaybeString = TOr(TNonEmptyString, TNone)
a maybe non-empty string
|
|
TMaybeBool = TOr(TBool, TNone)
a maybe boolean (bool or none)
|
|
TPositiveInt = TAnd(TInt, lambda v: v >= 0)
a positive integer
|
|
TStrictPositiveInt = TAnd(TInt, lambda v: v > 0)
a strictly positive integer
|