src/reportlab/lib/styles.py
branchpy33
changeset 3723 99aa837b6703
parent 3721 0c93dd8ff567
child 3738 6e5e6d64ab2d
equal deleted inserted replaced
3722:29c11b905751 3723:99aa837b6703
    60         self.refresh()
    60         self.refresh()
    61         self._setKwds(**kw)
    61         self._setKwds(**kw)
    62 
    62 
    63     def _setKwds(self,**kw):
    63     def _setKwds(self,**kw):
    64         #step three - copy keywords if any
    64         #step three - copy keywords if any
    65         for (key, value) in list(kw.items()):
    65         for key, value in kw.items():
    66              self.__dict__[key] = value
    66              self.__dict__[key] = value
    67 
    67 
    68     def __repr__(self):
    68     def __repr__(self):
    69         return "<%s '%s'>" % (self.__class__.__name__, self.name)
    69         return "<%s '%s'>" % (self.__class__.__name__, self.name)
    70 
    70 
    71     def refresh(self):
    71     def refresh(self):
    72         """re-fetches attributes from the parent on demand;
    72         """re-fetches attributes from the parent on demand;
    73         use if you have been hacking the styles.  This is
    73         use if you have been hacking the styles.  This is
    74         used by __init__"""
    74         used by __init__"""
    75         if self.parent:
    75         if self.parent:
    76             for (key, value) in list(self.parent.__dict__.items()):
    76             for key, value in self.parent.__dict__.items():
    77                 if (key not in ['name','parent']):
    77                 if (key not in ['name','parent']):
    78                     self.__dict__[key] = value
    78                     self.__dict__[key] = value
    79 
    79 
    80     def listAttrs(self, indent=''):
    80     def listAttrs(self, indent=''):
    81         print(indent + 'name =', self.name)
    81         print(indent + 'name =', self.name)