src/reportlab/lib/abag.py
branchpy33
changeset 3721 0c93dd8ff567
parent 3617 ae5744e97c42
child 3756 475d5ceb83b9
equal deleted inserted replaced
3720:7a059dde5bf5 3721:0c93dd8ff567
    23         if attr: n.__dict__.update(attr)
    23         if attr: n.__dict__.update(attr)
    24         return n
    24         return n
    25 
    25 
    26     def __repr__(self):
    26     def __repr__(self):
    27         D = self.__dict__
    27         D = self.__dict__
    28         K = D.keys()
    28         K = list(D.keys())
    29         K.sort()
    29         K.sort()
    30         return '%s(%s)' % (self.__class__.__name__,', '.join(['%s=%r' % (k,D[k]) for k in K]))
    30         return '%s(%s)' % (self.__class__.__name__,', '.join(['%s=%r' % (k,D[k]) for k in K]))
    31 
    31 
    32 if __name__=="__main__":
    32 if __name__=="__main__":
    33     AB = ABag(a=1, c="hello")
    33     AB = ABag(a=1, c="hello")
    34     CD = AB.clone()
    34     CD = AB.clone()
    35     print AB
    35     print(AB)
    36     print CD
    36     print(CD)