Package kiwi :: Module argcheck :: Class argcheck
[frames | no frames]

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)

Class Method Details

disable(cls)

Disable argcheck globally

enable(cls)

Enable argcheck globally

Generated by Epydoc 2.1 on Mon Jan 29 16:46:02 2007 http://epydoc.sf.net