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

Method as_comment

Tools/cases_generator/stack.py:647–652  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

645 self.outputs = []
646
647 def as_comment(self) -> str:
648 stack_comment = self.stack.as_comment()
649 next_line = "\n "
650 inputs = ", ".join([var.compact_str() for var in self.inputs])
651 outputs = ", ".join([var.compact_str() for var in self.outputs])
652 return f"{stack_comment[:-2]}{next_line}inputs: {inputs} outputs: {outputs}*/"
653
654 def _print(self, out: CWriter) -> None:
655 if PRINT_STACKS:

Callers 1

_printMethod · 0.95

Calls 3

compact_strMethod · 0.80
as_commentMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected