Package gnue :: Package common :: Package base :: Module checktype
[show private | hide private]

Module gnue.common.base.checktype

Support for checking the type of variables.
Exceptions
TypeError Raised when checktype detects a wrong type.

Function Summary
  checktype(variable, validtype)
Check a varaible (for example a parameter to a function) for a correct type.

Function Details

checktype(variable, validtype)

Check a varaible (for example a parameter to a function) for a correct type. This function is available as builtin function.
Parameters:
variable - Variable to check.
validtype - Type, class, or a list of types and classes that are valid.
Raises:
TypeError - The variable has a type not listed in the valid types.


GNUe Home

Private API

Developer's Corner