[Zope3-checkins] CVS: Zope3/src/zope/pagetemplate - tales.py:1.1.2.2
Fred L. Drake, Jr.
fred@zope.com
Mon, 23 Dec 2002 16:43:25 -0500
Update of /cvs-repository/Zope3/src/zope/pagetemplate
In directory cvs.zope.org:/tmp/cvs-serv12876
Modified Files:
Tag: NameGeddon-branch
tales.py
Log Message:
Update to reflect the new world naming.
=== Zope3/src/zope/pagetemplate/tales.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/pagetemplate/tales.py:1.1.2.1 Mon Dec 23 14:32:58 2002
+++ Zope3/src/zope/pagetemplate/tales.py Mon Dec 23 16:42:54 2002
@@ -21,10 +21,10 @@
import re
import sys
-from types import StringType, StringTypes
+from types import StringTypes
-import zope.pagetemplate
-from zope.pagetemplate.safemapping import SafeMapping
+from zope.pagetemplate import iterator
+from zope.pagetemplate import safemapping
from zope.tal.interfaces import ITALESCompiler, ITALESEngine, ITALESErrorInfo
@@ -52,9 +52,9 @@
_marker = object()
-class Iterator(Zope.ZTUtils.Iterator):
+class Iterator(iterator.Iterator):
def __init__(self, name, seq, context):
- Zope.ZTUtils.Iterator.__init__(self, seq)
+ iterator.Iterator.__init__(self, seq)
self.name = name
self._context = context
@@ -62,7 +62,7 @@
return self
def next(self):
- if Zope.ZTUtils.Iterator.next(self):
+ if iterator.Iterator.next(self):
self._context.setLocal(self.name, self.seq[self.index])
return 1
return 0
@@ -164,7 +164,7 @@
__implements__ = ITALESEngine
- _context_class = SafeMapping
+ _context_class = safemapping.SafeMapping
position = (None, None)
source_file = None
@@ -222,8 +222,8 @@
return it
def evaluate(self, expression,
- isinstance=isinstance, StringType=StringType):
- if isinstance(expression, StringType):
+ isinstance=isinstance):
+ if isinstance(expression, str):
expression = self._engine.compile(expression)
__traceback_supplement__ = (
TALESTracebackSupplement, self, expression)
@@ -265,7 +265,7 @@
class TALESTracebackSupplement:
- """Implementation of Zope.Exceptions.ITracebackSupplement"""
+ """Implementation of zope.exceptions.ITracebackSupplement"""
def __init__(self, context, expression):
self.context = context
self.source_url = context.source_file