reportlab/lib/abag.py
changeset 2721 f52c73a6fa96
parent 2332 2a7ab4405e18
--- a/reportlab/lib/abag.py	Tue Nov 21 14:35:05 2006 +0000
+++ b/reportlab/lib/abag.py	Tue Dec 19 14:50:51 2006 +0000
@@ -13,12 +13,11 @@
     c = a.clone(ak0=av0,.....) copy with optional additional attributes.
     """
     def __init__(self,**attr):
-        for k,v in attr.items():
-            setattr(self,k,v)
+        self.__dict__.update(attr)
 
     def clone(self,**attr):
-        n = apply(ABag,(),self.__dict__)
-        if attr != {}: apply(ABag.__init__,(n,),attr)
+        n = ABag(**self.__dict__)
+        if attr: n.__dict__.update(attr)
         return n
 
     def __repr__(self):
@@ -41,4 +40,4 @@
     AB = ABag(a=1, c="hello")
     CD = AB.clone()
     print AB
-    print CD
\ No newline at end of file
+    print CD