src/reportlab/lib/attrmap.py
branchpy33
changeset 3723 99aa837b6703
parent 3721 0c93dd8ff567
child 3762 4817e577522d
--- a/src/reportlab/lib/attrmap.py	Sun Feb 17 12:13:56 2013 +0000
+++ b/src/reportlab/lib/attrmap.py	Tue Apr 30 14:28:14 2013 +0100
@@ -28,7 +28,6 @@
 
 
 '''
-from UserDict import UserDict
 from reportlab.lib.validators import isAnything, _SequenceTypes, DerivedValue
 from reportlab import rl_config
 
@@ -50,7 +49,7 @@
         self.desc = desc
         self._initial = initial
         self._advancedUsage = advancedUsage
-        for k,v in list(kw.items()):
+        for k,v in kw.items():
             setattr(self,k,v)
 
     def __getattr__(self,name):
@@ -65,7 +64,7 @@
     def __repr__(self):
         return 'AttrMapValue(%s)' % ', '.join(['%s=%r' % i for i in self.__dict__.items()])
 
-class AttrMap(UserDict):
+class AttrMap(dict):
     def __init__(self,BASE=None,UNWANTED=[],**kw):
         data = {}
         if BASE:
@@ -79,7 +78,7 @@
                     else:
                         raise ValueError('BASE=%s has wrong kind of value' % str(B))
 
-        UserDict.__init__(self,data)
+        dict.__init__(self,data)
         self.remove(UNWANTED)
         self.data.update(kw)