Created on 4 May 2013. More...
Public Member Functions | |
| def | type_check (self, value, valid_type) |
| Checks that value is an instance of valid_type, and returns value if it is, or throws a TypeError otherwise. More... | |
| def | class_check (self, klass, valid_class) |
| Checks that class is an instance of valid_class, and returns klass if it is, or throws a TypeError otherwise. More... | |
| def | confirm (self, assertion, error) |
| Acts like an assertion, but will not be disabled when debug is disabled. | |
Created on 4 May 2013.
| def volatility.validity.ValidityRoutines.class_check | ( | self, | |
| klass, | |||
| valid_class | |||
| ) |
Checks that class is an instance of valid_class, and returns klass if it is, or throws a TypeError otherwise.
:param klass: Class to validate :type klass: class :param valid_class: Valid class against which to check class validity :type valid_class: class
| def volatility.validity.ValidityRoutines.type_check | ( | self, | |
| value, | |||
| valid_type | |||
| ) |
Checks that value is an instance of valid_type, and returns value if it is, or throws a TypeError otherwise.
:param value: The value of which to validate the type :type value: object :param valid_type: The type against which to validate :type valid_type: type