Commit b839009d authored by Fred Drake's avatar Fred Drake

Make the Python value for "default" evaluate as true in a Boolean context.

parent abd807db
......@@ -15,7 +15,7 @@
An implementation of a generic TALES engine
"""
__version__='$Revision: 1.29 $'[11:-2]
__version__='$Revision: 1.30 $'[11:-2]
import re, sys, ZTUtils
from MultiMapping import MultiMapping
......@@ -40,8 +40,6 @@ class CompilerError(Exception):
class Default:
'''Retain Default'''
def __nonzero__(self):
return 0
Default = Default()
_marker = []
......
......@@ -22,7 +22,9 @@ import driver
from TALDefs import NAME_RE, TALESError, ErrorInfo
Default = []
class Default:
pass
Default = Default()
name_match = re.compile(r"(?s)(%s):(.*)\Z" % NAME_RE).match
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment