#NEWLINE# def VerifyType( arg , argname , legalTypes , ltd , errmsgExtra = '' ) : #NEWLINE# #INDENT# "Verify the type of an argument.\n    \n    arg, any, the argument.\n    argname, string, name of the argument.\n    legalTypes, list of type objects, the allowed types.\n    ltd, string, description of legal types (for error message).\n    errmsgExtra, string, text to append to error message.\n    Returns: None.\n    Exceptions: TypeError if 'arg' is the wrong type.\n    " #NEWLINE# if ( type ( arg ) not in legalTypes ) : #NEWLINE# #INDENT# m = _errmsg ( argname , ltd , errmsgExtra ) #NEWLINE# raise TypeError ( m )