
   typesafe - formal type asserting decorators, by Krister Hedfors

   Based on ActiveState recipe:
     http://code.activestate.com/recipes/454322-type-checking-decorator/


install:
  $ python setup.py install

examples:
  See example.py.


  Usage:
    from typesafe import hard_types, soft_types
    or
    from typesafe import *
    
    @hard_types( name=str, age=(int,float))
    def func_or_method(name, age):
        pass
    
    @hard_types(dict( name=str, age=(int,float) ))
    def func_or_method(name, age):
        pass
    
    The @hard_types() decorator raises HardTypesException unless
    specified arguments are of the specified type or types:
    @hard_types(argname=type, [...])
    @hard_types(argname=types, [...])
    
    The @soft_types() decorator raises SoftTypesException unless
    specified argument types match, or are subtypes, of the specified
    type or types. 
    @soft_types(argname=type, [...])
    @soft_types(argname=types, [...])

