[Checkins] SVN: z3c.pt/trunk/src/z3c/pt/expressions.py Fix name
error found while perusing code and test.
Chris McDonough
chrism at plope.com
Sun Jun 15 19:19:20 EDT 2008
Log message for revision 87417:
Fix name error found while perusing code and test.
Changed:
U z3c.pt/trunk/src/z3c/pt/expressions.py
-=-
Modified: z3c.pt/trunk/src/z3c/pt/expressions.py
===================================================================
--- z3c.pt/trunk/src/z3c/pt/expressions.py 2008-06-15 20:48:52 UTC (rev 87416)
+++ z3c.pt/trunk/src/z3c/pt/expressions.py 2008-06-15 23:19:19 UTC (rev 87417)
@@ -78,6 +78,18 @@
>>> declaration("variable1, variable2")
declaration('variable1', 'variable2')
+
+ Repeat not allowed:
+
+ >>> declaration('repeat')
+ Traceback (most recent call last):
+ ...
+ ValueError: Invalid variable name 'repeat' (reserved).
+
+ >>> declaration('_disallowed')
+ Traceback (most recent call last):
+ ...
+ ValueError: Invalid variable name '_disallowed' (starts with an underscore).
"""
variables = []
@@ -85,7 +97,7 @@
var = var.strip()
if var in ('repeat',):
- raise ValueError, "Invalid variable name '%s' (reserved)." % variable
+ raise ValueError, "Invalid variable name '%s' (reserved)." % var
if var.startswith('_') and not var.startswith('_tmp'):
raise ValueError(
More information about the Checkins
mailing list