Decorator to check type and value of arguments.
Usage:
>>> @argcheck(types...) ... def function(args..)
or
>>> class Class: ... @argcheck(types..) ... def method(self, args)
You can customize the checks by subclassing your type from CustomType, there are two builtin types: number which is a float/int combined check and a percent which verifis that the value is a percentage
Function | __init__ | Undocumented |
Function | enable | Enable argcheck globally |
Function | disable | Disable argcheck globally |
Function | __call__ | Undocumented |
Function | extra_check | Undocumented |
Function | _type_check | Undocumented |
Enable argcheck globally
Disable argcheck globally