[Zope3-checkins] CVS: Zope3/src/zope/tales - expressions.py:1.7
Evan Simpson
cvs-admin at zope.org
Wed Nov 5 14:38:13 EST 2003
Update of /cvs-repository/Zope3/src/zope/tales
In directory cvs.zope.org:/tmp/cvs-serv20373
Modified Files:
expressions.py
Log Message:
New preferred spelling for 'CONTEXTS/varname' is '/varname'.
=== Zope3/src/zope/tales/expressions.py 1.6 => 1.7 ===
--- Zope3/src/zope/tales/expressions.py:1.6 Tue Sep 16 18:11:26 2003
+++ Zope3/src/zope/tales/expressions.py Wed Nov 5 14:38:13 2003
@@ -99,7 +99,7 @@
raise CompilerError(
'Dynamic name specified in first subpath element')
- if not _valid_name(base):
+ if base and not _valid_name(base):
raise CompilerError, 'Invalid variable name "%s"' % element
self._base = base
compiledpath[0]=first[1:]
@@ -112,7 +112,7 @@
compiled_path = self._compiled_path
base = self._base
- if base == 'CONTEXTS': # Special base name
+ if base == 'CONTEXTS' or not base: # Special base name
ob = econtext.contexts
else:
ob = vars[base]
More information about the Zope3-Checkins
mailing list