(self, x, level)
| 141 | return s |
| 142 | |
| 143 | def repr_instance(self, x, level): |
| 144 | try: |
| 145 | s = builtins.repr(x) |
| 146 | # Bugs in x.__repr__() can cause arbitrary |
| 147 | # exceptions -- then make up something |
| 148 | except Exception: |
| 149 | return '<%s instance at %#x>' % (x.__class__.__name__, id(x)) |
| 150 | if len(s) > self.maxother: |
| 151 | i = max(0, (self.maxother-3)//2) |
| 152 | j = max(0, self.maxother-3-i) |
| 153 | s = s[:i] + self.fillvalue + s[len(s)-j:] |
| 154 | return s |
| 155 | |
| 156 | |
| 157 | def _possibly_sorted(x): |