[Zope3-checkins] CVS: Zope3/src/zope/tal - dummyengine.py:1.13 talinterpreter.py:1.28

Godefroid Chapelle gotcha at swing.be
Fri Aug 15 11:03:17 EDT 2003


Update of /cvs-repository/Zope3/src/zope/tal
In directory cvs.zope.org:/tmp/cvs-serv12025

Modified Files:
	dummyengine.py talinterpreter.py 
Log Message:
some reformatting to ease comparisons between 2.x and 3



=== Zope3/src/zope/tal/dummyengine.py 1.12 => 1.13 ===
--- Zope3/src/zope/tal/dummyengine.py:1.12	Fri Aug  8 19:04:56 2003
+++ Zope3/src/zope/tal/dummyengine.py	Fri Aug 15 10:02:37 2003
@@ -247,6 +247,6 @@
             text = msgid.upper()
 
         def repl(m):
-            return mapping[m.group(m.lastindex).lower()]
+            return unicode(mapping[m.group(m.lastindex).lower()])
         cre = re.compile(r'\$(?:([_A-Za-z][-\w]*)|\{([_A-Za-z][-\w]*)\})')
         return cre.sub(repl, text)


=== Zope3/src/zope/tal/talinterpreter.py 1.27 => 1.28 ===
--- Zope3/src/zope/tal/talinterpreter.py:1.27	Fri Aug  8 19:04:56 2003
+++ Zope3/src/zope/tal/talinterpreter.py	Fri Aug 15 10:02:37 2003
@@ -325,16 +325,16 @@
                 value = None
             else:
                 ok = 0
-        else:
-            if expr is not None:
-                evalue = self.engine.evaluateText(item[3])
-                if evalue is self.Default:
-                    if action == 'insert': # Cancelled insert
-                        ok = 0
-                else:
-                    if evalue is None:
-                        ok = 0
-                    value = evalue
+        elif expr is not None:
+            evalue = self.engine.evaluateText(item[3])
+            if evalue is self.Default:
+                if action == 'insert': # Cancelled insert
+                    ok = 0
+            else:
+                if evalue is None:
+                    ok = 0
+                value = evalue
+                
         if ok:
             if xlat:
                 translated = self.translate(msgid or value, value, {})
@@ -344,7 +344,6 @@
                 value = name
             value = "%s=%s" % (name, quote(value))
         return ok, name, value
-
     bytecode_handlers["<attrAction>"] = attrAction
 
     def no_tag(self, start, program):




More information about the Zope3-Checkins mailing list