[Zope3-checkins] CVS: Zope3/src/zope/tales - tales.py:1.3
Barry Warsaw
barry@zope.com
Tue, 15 Apr 2003 17:40:17 -0400
Update of /cvs-repository/Zope3/src/zope/tales
In directory cvs.zope.org:/tmp/cvs-serv29580/src/zope/tales
Modified Files:
tales.py
Log Message:
evaluate(): Get rid of a bogus argument masking a builtin.
evaluateText(): Slightly rewrite the logic.
=== Zope3/src/zope/tales/tales.py 1.2 => 1.3 ===
--- Zope3/src/zope/tales/tales.py:1.2 Tue Apr 15 11:54:17 2003
+++ Zope3/src/zope/tales/tales.py Tue Apr 15 17:40:17 2003
@@ -262,8 +262,7 @@
self.repeat_vars[name] = it
return it
- def evaluate(self, expression,
- isinstance=isinstance):
+ def evaluate(self, expression):
if isinstance(expression, str):
expression = self._engine.compile(expression)
__traceback_supplement__ = (
@@ -279,9 +278,9 @@
text = self.evaluate(expr)
if text is _default or text is None:
return text
- if not isinstance(text, StringTypes):
- text = unicode(text)
- return text
+ if isinstance(text, StringTypes):
+ return text
+ return unicode(text)
def evaluateStructure(self, expr):
return self.evaluate(expr)