[Zope-Checkins] CVS: Zope3/lib/python/Zope/PageTemplate - Expressions.py:1.1.2.11

Guido van Rossum guido@python.org
Thu, 25 Apr 2002 23:44:31 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/PageTemplate
In directory cvs.zope.org:/tmp/cvs-serv22322

Modified Files:
      Tag: Zope-3x-branch
	Expressions.py 
Log Message:
Cast the value of a NotExpr to int(), to avoid printing bools in
Python 2.3.


=== Zope3/lib/python/Zope/PageTemplate/Expressions.py 1.1.2.10 => 1.1.2.11 ===
 
     def __call__(self, econtext):
-        return not econtext.evaluateBoolean(self._c)
+        return int(not econtext.evaluateBoolean(self._c))
 
     def __repr__(self):
         return '<NotExpr %s>' % `self._s`