[Zope3-checkins] CVS: Zope3/src/zope/tales/tests - simpleexpr.py:1.1
Jim Fulton
jim@zope.com
Tue, 20 May 2003 16:22:59 -0400
Update of /cvs-repository/Zope3/src/zope/tales/tests
In directory cvs.zope.org:/tmp/cvs-serv29991
Added Files:
simpleexpr.py
Log Message:
Moved the SimpleExpr class to the tests package, which is the only
place it's needed.
=== Added File Zope3/src/zope/tales/tests/simpleexpr.py ===
##############################################################################
#
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
class SimpleExpr:
'''Simple example of an expression type handler
for testing
'''
def __init__(self, name, expr, engine):
self._name = name
self._expr = expr
def __call__(self, econtext):
return self._name, self._expr
def __repr__(self):
return '<SimpleExpr %s %s>' % (self._name, `self._expr`)