MCPcopy Index your code
hub / github.com/RustPython/RustPython / repr1

Method repr1

Lib/pydoc.py:616–621  ·  view source on GitHub ↗
(self, x, level)

Source from the content-addressed store, hash-verified

614 return Repr.repr(self, object)
615
616 def repr1(self, x, level):
617 if hasattr(type(x), '__name__'):
618 methodname = 'repr_' + '_'.join(type(x).__name__.split())
619 if hasattr(self, methodname):
620 return getattr(self, methodname)(x, level)
621 return self.escape(cram(stripid(repr(x)), self.maxother))
622
623 def repr_string(self, x, level):
624 test = cram(x, self.maxstring)

Callers

nothing calls this directly

Calls 8

escapeMethod · 0.95
hasattrFunction · 0.85
getattrFunction · 0.85
cramFunction · 0.85
stripidFunction · 0.85
reprFunction · 0.85
joinMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected