(self)
| 81 | return str(self) |
| 82 | |
| 83 | def __str__(self): |
| 84 | # type: () -> str |
| 85 | s = "" |
| 86 | dkeys = self.__class__.__dict__.copy() |
| 87 | dkeys.update(self.__dict__) |
| 88 | keys = sorted(dkeys) |
| 89 | for i in keys: |
| 90 | if i[0] != "_": |
| 91 | r = repr(getattr(self, i)) |
| 92 | r = " ".join(r.split()) |
| 93 | wlen = 76 - max(len(i), 10) |
| 94 | if len(r) > wlen: |
| 95 | r = r[:wlen - 3] + "..." |
| 96 | s += "%-10s = %s\n" % (i, r) |
| 97 | return s[:-1] |
| 98 | |
| 99 | |
| 100 | class Interceptor(object): |