Module argparser :: Class EvalChecker
[show private | hide private]
[frames | no frames]

Class EvalChecker

TypeChecker --+
              |
             EvalChecker


Evaluate its input argument as python code and return the resulting object.
Method Summary
  __init__(self, typename, typeargs)
Initializes the TypeChecker.
varies check(self, arg)
Assumes the argument is valid python code.

Method Details

__init__(self, typename, typeargs)
(Constructor)

Initializes the TypeChecker. Over-ridden by all the TypeChecker subclasses.
Parameters:
typename - the name of the type
           (type=string)
typeargs - the arguments passed to the TypeChecker to initialize it
           (type=tuple)
Overrides:
argparser.TypeChecker.__init__ (inherited documentation)

check(self, arg)

Assumes the argument is valid python code. It evaluates the code and returns the result.
Parameters:
arg - the argument to evaluate
           (type=string)
Returns:
the result of eval(arg)
           (type=varies)
Raises:
ParserException - if we can't eval the argument

Generated by Epydoc 1.1 on Mon Apr 28 21:11:24 2003 http://epydoc.sf.net