(self, x, level)
| 204 | return s |
| 205 | |
| 206 | def repr_instance(self, x, level): |
| 207 | try: |
| 208 | s = builtins.repr(x) |
| 209 | # Bugs in x.__repr__() can cause arbitrary |
| 210 | # exceptions -- then make up something |
| 211 | except Exception: |
| 212 | return '<%s instance at %#x>' % (x.__class__.__name__, id(x)) |
| 213 | if len(s) > self.maxother: |
| 214 | i = max(0, (self.maxother-3)//2) |
| 215 | j = max(0, self.maxother-3-i) |
| 216 | s = s[:i] + self.fillvalue + s[len(s)-j:] |
| 217 | return s |
| 218 | |
| 219 | |
| 220 | def _possibly_sorted(x): |