MCPcopy Index your code
hub / github.com/python/cpython / __repr__

Method __repr__

Tools/clinic/libclinic/block_parser.py:71–83  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

69 indent: str = ''
70
71 def __repr__(self) -> str:
72 dsl_name = self.dsl_name or "text"
73 def summarize(s: object) -> str:
74 s = repr(s)
75 if len(s) > 30:
76 return s[:26] + "..." + s[0]
77 return s
78 parts = (
79 repr(dsl_name),
80 f"input={summarize(self.input)}",
81 f"output={summarize(self.output)}"
82 )
83 return f"<clinic.Block {' '.join(parts)}>"
84
85
86class BlockParser:

Callers

nothing calls this directly

Calls 2

summarizeFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected