k.a.argcheck(object) : class documentation

Part of kiwi.argcheck View In Hierarchy

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 __init__ Undocumented
Class Method enable Enable argcheck globally
Class Method disable Disable argcheck globally
Method __call__ Undocumented
Method extra_check Undocumented
Method _type_check Undocumented
def __init__(self, *types):
Undocumented
@classmethod
def enable(cls):
Enable argcheck globally
@classmethod
def disable(cls):
Disable argcheck globally
def __call__(self, func):
Undocumented
def extra_check(self, names, types, args, kwargs):
Undocumented
def _type_check(self, value, argument_type, name, default=_NoValue):
Undocumented
API Documentation for Kiwi, generated by pydoctor at 2010-05-20 02:10:57.