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

Method prettyprint

Tools/unicode/dawg.py:192–197  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

190 stack.append(child)
191
192 def prettyprint(self):
193 for node in sorted(self.enum_all_nodes(), key=lambda e: e.id):
194 s_final = " final" if node.final else ""
195 print(f"{node.id}: ({node}) {s_final}")
196 for label, child in sorted(node.edges.items()):
197 print(f" {label} goto {child.id}")
198
199 def _inverse_lookup(self, number):
200 assert 0, "not working in the current form, but keep it as the pure python version of compact lookup"

Callers

nothing calls this directly

Calls 2

enum_all_nodesMethod · 0.95
itemsMethod · 0.45

Tested by

no test coverage detected