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

Method compact_str

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

Source from the content-addressed store, hash-verified

149 return f"Local('{self.item.name}', mem={self.memory_offset}, local={self.in_local}, array={self.is_array()})"
150
151 def compact_str(self) -> str:
152 mtag = "M" if self.memory_offset else ""
153 dtag = "L" if self.in_local else ""
154 atag = "A" if self.is_array() else ""
155 return f"'{self.item.name}'{mtag}{dtag}{atag}"
156
157 @staticmethod
158 def unused(defn: StackItem, offset: PointerOffset | None) -> "Local":

Callers 2

as_commentMethod · 0.80
as_commentMethod · 0.80

Calls 1

is_arrayMethod · 0.95

Tested by

no test coverage detected