Home | Trees | Index | Help |
|
---|
Package lemon :: Package external :: Package Cheetah :: Package Utils :: Module VerifyType |
|
Functions to verify an argument's type Meta-Data ================================================================================ Author: Mike Orr <iron@mso.oz.net> License: This software is released for unlimited distribution under the terms of the Python license. Version: $Revision: 1.1 $ Start Date: 2001/11/07 Last Revision Date: $Date: 2003/08/12 09:17:11 $
Function Summary | |
---|---|
Verify the type of an argument. | |
Same, but if it's a class, verify it's a subclass of the right class. | |
Construct an error message. |
Variable Summary | |
---|---|
str |
__author__ = 'Mike Orr <iron@mso.oz.net>'
|
str |
__revision__ = '1.1'
|
Function Details |
---|
VerifyType(arg, argname, legalTypes, ltd, errmsgExtra='')Verify the type of an argument. arg, any, the argument. argname, string, name of the argument. legalTypes, list of type objects, the allowed types. ltd, string, description of legal types (for error message). errmsgExtra, string, text to append to error message. Returns: None. Exceptions: TypeError if 'arg' is the wrong type. |
VerifyTypeClass(arg, argname, legalTypes, ltd, klass, errmsgExtra='')Same, but if it's a class, verify it's a subclass of the right class. arg, any, the argument. argname, string, name of the argument. legalTypes, list of type objects, the allowed types. ltd, string, description of legal types (for error message). klass, class, the parent class. errmsgExtra, string, text to append to the error message. Returns: None. Exceptions: TypeError if 'arg' is the wrong type. |
_errmsg(argname, ltd, errmsgExtra='')Construct an error message. argname, string, the argument name. ltd, string, description of the legal types. errmsgExtra, string, text to append to error mssage. Returns: string, the error message. |
Variable Details |
---|
__author__
|
__revision__
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Mon Nov 10 15:08:18 2003 | http://epydoc.sf.net |