Commit 7929924a authored by Shane Hathaway's avatar Shane Hathaway

Added code that will reveal bugs in calls to namespace().

parent 969f6d84
......@@ -82,8 +82,8 @@
# attributions are listed in the accompanying credits file.
#
##############################################################################
'''$Id: DT_Util.py,v 1.68 2000/06/29 14:34:19 shane Exp $'''
__version__='$Revision: 1.68 $'[11:-2]
'''$Id: DT_Util.py,v 1.69 2000/07/05 15:52:55 shane Exp $'''
__version__='$Revision: 1.69 $'[11:-2]
import regex, string, math, os
from string import strip, join, atoi, lower, split, find
......@@ -256,9 +256,13 @@ d['range']=careful_range
# __allow_access_to_unprotected_subobjects__=1
def namespace(self, **kw):
"""Create a tuple consisting of a single instance whos attributes are
"""Create a tuple consisting of a single instance whose attributes are
provided as keyword arguments."""
# NOTE: the self argument needs to be a TemplateDict instance.
if type(self) != TemplateDict:
raise TypeError,'''A call was made to DT_Util.namespace() with an
incorrect "self" argument. It could be caused by a product which
is not yet compatible with this version of Zope. The traceback
information may contain more details.'''
return apply(self, (), kw)
d['namespace']=namespace
......
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