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

Method as_comment

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

Source from the content-addressed store, hash-verified

348 return (self.physical_sp - self.logical_sp).to_c()
349
350 def as_comment(self) -> str:
351 variables = ", ".join([v.compact_str() for v in self.variables])
352 return (
353 f"/* Variables=[{variables}]; base={self.base_offset.to_c()}; sp={self.physical_sp.to_c()}; logical_sp={self.logical_sp.to_c()} */"
354 )
355
356 def _print(self, out: CWriter) -> None:
357 if PRINT_STACKS:

Callers 4

popMethod · 0.95
_printMethod · 0.95
as_commentMethod · 0.45
_print_storageMethod · 0.45

Calls 3

compact_strMethod · 0.80
to_cMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected