Type argcheck
object
--+
|
argcheck
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
Method Summary |
|
disable (cls)
Disable argcheck globally (Class method)
|
|
enable (cls)
Enable argcheck globally (Class method)
|
|
extra_check(self,
names,
types,
args,
kwargs)
|
disable(cls)
Disable argcheck globally
-
|
enable(cls)
Enable argcheck globally
-
|