src/reportlab/lib/attrmap.py
branchrtl-support
changeset 3467 4f25b3a34c5f
parent 3029 eded59f94021
--- a/src/reportlab/lib/attrmap.py	Mon Nov 23 13:27:57 2009 +0000
+++ b/src/reportlab/lib/attrmap.py	Thu Oct 21 10:34:13 2010 +0000
@@ -41,14 +41,15 @@
         self.kw = kw
 
     def __call__(self):
-        return apply(self.func,self.args,self.kw)
+        return self.func(*self.args,**self.kw)
 
 class AttrMapValue:
     '''Simple multi-value holder for attribute maps'''
-    def __init__(self,validate=None,desc=None,initial=None, **kw):
+    def __init__(self,validate=None,desc=None,initial=None, advancedUsage=0, **kw):
         self.validate = validate or isAnything
         self.desc = desc
         self._initial = initial
+        self._advancedUsage = advancedUsage
         for k,v in kw.items():
             setattr(self,k,v)
 
@@ -61,6 +62,9 @@
             return 0
         raise AttributeError, name
 
+    def __repr__(self):
+        return 'AttrMapValue(%s)' % ', '.join(['%s=%r' % i for i in self.__dict__.iteritems()])
+
 class AttrMap(UserDict):
     def __init__(self,BASE=None,UNWANTED=[],**kw):
         data = {}