src/reportlab/lib/attrmap.py
branchpy33
changeset 3791 fb8d3d2f8704
parent 3763 d079e73fb7b0
child 3794 398ea04239b5
equal deleted inserted replaced
3790:2d62ae94f4cb 3791:fb8d3d2f8704
    72             if isinstance(BASE,AttrMap):
    72             if isinstance(BASE,AttrMap):
    73                 data = BASE
    73                 data = BASE
    74             else:
    74             else:
    75                 if not isSeq(BASE): BASE = (BASE,)
    75                 if not isSeq(BASE): BASE = (BASE,)
    76                 for B in BASE:
    76                 for B in BASE:
    77                     if hasattr(B,'_attrMap'):
    77                     am = getattr(B,'_attrMap',self)
    78                         data.update(B._attrMap)
    78                     if am is not self:
       
    79                         if am: data.update(am)
    79                     else:
    80                     else:
    80                         raise ValueError('BASE=%s has wrong kind of value' % repr(B))
    81                         raise ValueError('BASE=%s has wrong kind of value' % ascii(B))
    81 
    82 
    82         dict.__init__(self,data)
    83         dict.__init__(self,data)
    83         self.remove(UNWANTED)
    84         self.remove(UNWANTED)
    84         self.update(kw)
    85         self.update(kw)
    85 
    86