Expression Engine¶
-
class
zope.tales.tales.
Context
(engine, contexts)[source]¶ Bases:
object
Expression engine, an implementation of
zope.tal.interfaces.ITALExpressionEngine
.This class is called
Context
because an instance of this class holds context information (namespaces) that it uses when evaluating compiled expressions.Parameters: - engine – A
ExpressionEngine
(azope.tal.interfaces.ITALExpressionCompiler
) - contexts – A mapping (namespace) of variables that forms the base variable scope.
-
setContext
(name, value)[source]¶ Hook to allow subclasses to do things like adding security proxies.
-
evaluate
(expression)[source]¶ Evaluate the expression by calling it, passing in this object, and return the raw results.
If expression is a string, it is first compiled.
-
evaluateValue
(expression)¶ Evaluate the expression by calling it, passing in this object, and return the raw results.
If expression is a string, it is first compiled.
-
evaluateStructure
(expression)¶ Evaluate the expression by calling it, passing in this object, and return the raw results.
If expression is a string, it is first compiled.
-
evaluateMacro
(expression)¶ Evaluate the expression by calling it, passing in this object, and return the raw results.
If expression is a string, it is first compiled.
- engine – A