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

Method clear_inputs

Tools/cases_generator/stack.py:468–475  ·  view source on GitHub ↗
(self, reason:str)

Source from the content-addressed store, hash-verified

466 )
467
468 def clear_inputs(self, reason:str) -> None:
469 while len(self.inputs) > self.peeks:
470 tos = self.inputs.pop()
471 if self.is_live(tos) and self.check_liveness:
472 raise StackError(
473 f"Input '{tos.name}' is still live {reason}"
474 )
475 self.stack.drop(tos.item, self.check_liveness)
476
477 def clear_dead_inputs(self) -> None:
478 live = ""

Callers 7

_push_defined_outputsMethod · 0.95
push_outputsMethod · 0.95
error_ifMethod · 0.80
exit_if_afterMethod · 0.80
exit_if_afterMethod · 0.80
error_ifMethod · 0.80
sync_spMethod · 0.80

Calls 4

is_liveMethod · 0.95
StackErrorClass · 0.85
dropMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected