MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / repr_string

Method repr_string

tools/python-3.11.9-amd64/Lib/pydoc.py:1200–1207  ·  view source on GitHub ↗
(self, x, level)

Source from the content-addressed store, hash-verified

1198 return cram(stripid(repr(x)), self.maxother)
1199
1200 def repr_string(self, x, level):
1201 test = cram(x, self.maxstring)
1202 testrepr = repr(test)
1203 if '\\' in test and '\\' not in replace(testrepr, r'\\', ''):
1204 # Backslashes are only literal in the string and are never
1205 # needed to make any special characters, so show a raw string.
1206 return 'r' + testrepr[0] + test + testrepr[0]
1207 return testrepr
1208
1209 repr_str = repr_string
1210

Callers

nothing calls this directly

Calls 2

cramFunction · 0.85
replaceFunction · 0.70

Tested by

no test coverage detected