WaterDoc: thing.assert - a defmethod
Contract a_thing.<assert a_type=optional name=optional if_failure=<get_type_checking/> />
Tests
More...
7.<assert <type.one_of 1 3 5 7 9/> if_failure="error"/>._parent
result=thing.number.integer
<try 2.<assert <type.one_of 1 3 5 7 9/>
            if_failure="error" message="not odd"/>._parent false> true </try>
result=true
If '_subject' is of type "a_type" then return '_subject' otherwise, indicate the failure based on the arg: 'if_failure'. "error" means error. "warning" means print a warning but still return '_subject'. "off" means don't even do the type check, just return '_subject'. The default value is <get_type_checking/> which will be one of the above three options, which itself is "off" by default. See also: get_type_checking