Initial version split from paraparser.py
authorrgbecker
Wed, 29 Nov 2000 16:16:33 +0000
changeset 517 dffd258916bc
parent 516 566a87f8335a
child 518 5be3fcb26c78
Initial version split from paraparser.py
reportlab/lib/abag.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reportlab/lib/abag.py	Wed Nov 29 16:16:33 2000 +0000
@@ -0,0 +1,16 @@
+#copyright ReportLab Inc. 2000
+#see license.txt for license details
+#history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/lib/abag.py?cvsroot=reportlab
+#$Header: /tmp/reportlab/reportlab/lib/abag.py,v 1.1 2000/11/29 16:16:33 rgbecker Exp $
+class ABag:
+	"""
+	A trivial BAG class for holding attributes
+	"""
+	def __init__(self,**attr):
+		for k,v in attr.items():
+			setattr(self,k,v)
+
+	def clone(self,**attr):
+		n = apply(ABag,(),self.__dict__)
+		if attr != {}: apply(ABag.__init__,(n,),attr)
+		return n