(self, x, level)
| 1206 | return cram(stripid(repr(x)), self.maxother) |
| 1207 | |
| 1208 | def repr_string(self, x, level): |
| 1209 | test = cram(x, self.maxstring) |
| 1210 | testrepr = repr(test) |
| 1211 | if '\\' in test and '\\' not in replace(testrepr, r'\\', ''): |
| 1212 | # Backslashes are only literal in the string and are never |
| 1213 | # needed to make any special characters, so show a raw string. |
| 1214 | return 'r' + testrepr[0] + test + testrepr[0] |
| 1215 | return testrepr |
| 1216 | |
| 1217 | repr_str = repr_string |
| 1218 |