Package lyntin :: 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:
lyntin.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
Overrides:
lyntin.argparser.TypeChecker.check

Generated by Epydoc 2.1 on Mon Aug 9 09:17:42 2004 http://epydoc.sf.net