[Checkins] SVN: z3c.pt/trunk/ Fixed interpolation bug.
Malthe Borch
mborch at gmail.com
Thu Aug 21 11:26:14 EDT 2008
Log message for revision 90079:
Fixed interpolation bug.
Changed:
U z3c.pt/trunk/CHANGES.txt
U z3c.pt/trunk/src/z3c/pt/expressions.py
-=-
Modified: z3c.pt/trunk/CHANGES.txt
===================================================================
--- z3c.pt/trunk/CHANGES.txt 2008-08-21 15:12:48 UTC (rev 90078)
+++ z3c.pt/trunk/CHANGES.txt 2008-08-21 15:26:14 UTC (rev 90079)
@@ -4,6 +4,10 @@
Version 1.0dev
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+- A syntax error is now raised when an interpolation expression is not
+ exhausted, e.g. only a part of the string is a valid
+ Python-expression. [malthe]
+
- System variables are now defined in a configuration class. [malthe]
- Improve performance of codegen by not repeatedly calling
Modified: z3c.pt/trunk/src/z3c/pt/expressions.py
===================================================================
--- z3c.pt/trunk/src/z3c/pt/expressions.py 2008-08-21 15:12:48 UTC (rev 90078)
+++ z3c.pt/trunk/src/z3c/pt/expressions.py 2008-08-21 15:26:14 UTC (rev 90079)
@@ -455,6 +455,9 @@
"Interpolation expressions must of the "
"form ${<expression>} (%s)" % string)
+ if expression and not m.group('expression'):
+ raise SyntaxError(expression)
+
return m
def method(self, string):
More information about the Checkins
mailing list