Commit faea22d3 authored by Shane Hathaway's avatar Shane Hathaway

Made namespace() use the C implementation when available.

parent 8c4be9f6
......@@ -82,8 +82,8 @@
# attributions are listed in the accompanying credits file.
#
##############################################################################
'''$Id: DT_Util.py,v 1.63 2000/05/25 18:29:25 brian Exp $'''
__version__='$Revision: 1.63 $'[11:-2]
'''$Id: DT_Util.py,v 1.64 2000/05/26 21:37:48 shane Exp $'''
__version__='$Revision: 1.64 $'[11:-2]
import regex, string, math, os
from string import strip, join, atoi, lower, split, find
......@@ -258,6 +258,9 @@ class namespace_:
def namespace(self, **kw):
"""Create a tuple consisting of a single instance whos attributes are
provided as keyword arguments."""
if callable(self):
# Use the default implementation (usually from cDocumentTemplate.)
return self(kw)
r=namespace_()
d=r.__dict__
for k, v in kw.items(): d[k]=v
......
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