(self, x, level)
| 1251 | return cram(stripid(repr(x)), self.maxother) |
| 1252 | |
| 1253 | def repr_string(self, x, level): |
| 1254 | test = cram(x, self.maxstring) |
| 1255 | testrepr = repr(test) |
| 1256 | if '\\' in test and '\\' not in replace(testrepr, r'\\', ''): |
| 1257 | # Backslashes are only literal in the string and are never |
| 1258 | # needed to make any special characters, so show a raw string. |
| 1259 | return 'r' + testrepr[0] + test + testrepr[0] |
| 1260 | return testrepr |
| 1261 | |
| 1262 | repr_str = repr_string |
| 1263 |